Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ from translatepy import Translator
|
|
10 |
import requests
|
11 |
import re
|
12 |
import asyncio
|
|
|
13 |
|
14 |
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
15 |
translator = Translator()
|
@@ -68,6 +69,7 @@ async def generate_image(
|
|
68 |
num_inference_steps=steps,
|
69 |
model=basemodel,
|
70 |
)
|
|
|
71 |
print(image1)
|
72 |
image2 = await client.text_to_image(
|
73 |
prompt=text,
|
@@ -78,7 +80,7 @@ async def generate_image(
|
|
78 |
model=model,
|
79 |
)
|
80 |
print(image2)
|
81 |
-
|
82 |
return image1, image2, seed
|
83 |
|
84 |
async def gen(
|
|
|
10 |
import requests
|
11 |
import re
|
12 |
import asyncio
|
13 |
+
from PIL import Image
|
14 |
|
15 |
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
16 |
translator = Translator()
|
|
|
69 |
num_inference_steps=steps,
|
70 |
model=basemodel,
|
71 |
)
|
72 |
+
image1 = Image.open(image1)
|
73 |
print(image1)
|
74 |
image2 = await client.text_to_image(
|
75 |
prompt=text,
|
|
|
80 |
model=model,
|
81 |
)
|
82 |
print(image2)
|
83 |
+
image2 = Image.open(image2)
|
84 |
return image1, image2, seed
|
85 |
|
86 |
async def gen(
|