Baraaqasem commited on
Commit
976463a
1 Parent(s): b016353

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -20
app.py CHANGED
@@ -1,22 +1,15 @@
1
- import os
2
- import subprocess
3
 
4
- # تعديل المسارات كما هو مطلوب
5
- model_path = "path/to/model"
6
- ae = "WFVAEModel_D8_4x8x8"
7
- ae_path = "path/to/vae"
8
- caption_refiner = "path/to/refiner"
9
- text_encoder_name_1 = "path/to/text_enc"
 
 
 
 
10
 
11
- # تشغيل الأمر (بدون المعامل غير المدعوم)
12
- cmd = [
13
- "python", "-m", "opensora.serve.gradio_web_server",
14
- "--model_path", model_path,
15
- "--ae", ae,
16
- "--ae_path", ae_path,
17
- "--caption_refiner", caption_refiner,
18
- "--text_encoder_name_1", text_encoder_name_1,
19
- # يمكنك إضافة المزيد من الخيارات المدعومة هنا
20
- ]
21
-
22
- subprocess.run(cmd)
 
1
+ import asyncio
2
+ from g4f.client import Client
3
 
4
+ async def main():
5
+ client = Client()
6
+
7
+ response = await client.images.async_generate(
8
+ prompt="a white siamese cat",
9
+ model="flux"
10
+ )
11
+
12
+ image_url = response.data[0].url
13
+ print(f"Generated image URL: {image_url}")
14
 
15
+ asyncio.run(main())