Spaces:
Runtime error
Runtime error
Baraaqasem
commited on
Commit
•
976463a
1
Parent(s):
b016353
Update app.py
Browse files
app.py
CHANGED
@@ -1,22 +1,15 @@
|
|
1 |
-
import
|
2 |
-
import
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
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())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|