Spaces:
Sleeping
Sleeping
Nithish310
commited on
Commit
•
c3b2412
1
Parent(s):
fed8b63
Update app.py
Browse files
app.py
CHANGED
@@ -178,13 +178,14 @@ def respond(message, history):
|
|
178 |
gr.Info("Generating Image, Please wait 10 sec...")
|
179 |
yield "Generating Image, Please wait 10 sec..."
|
180 |
try:
|
181 |
-
image = image_gen(f"{str(query)}")
|
182 |
-
yield gr.Image(image[1])
|
183 |
-
except:
|
184 |
client_sd3 = InferenceClient("stabilityai/stable-diffusion-3-medium-diffusers")
|
185 |
seed = random.randint(0, 999999)
|
186 |
-
|
|
|
187 |
yield gr.Image(image)
|
|
|
|
|
|
|
188 |
elif json_data["name"] == "image_qna":
|
189 |
inputs = llava(message, history)
|
190 |
streamer = TextIteratorStreamer(processor, skip_prompt=True, **{"skip_special_tokens": True})
|
|
|
178 |
gr.Info("Generating Image, Please wait 10 sec...")
|
179 |
yield "Generating Image, Please wait 10 sec..."
|
180 |
try:
|
|
|
|
|
|
|
181 |
client_sd3 = InferenceClient("stabilityai/stable-diffusion-3-medium-diffusers")
|
182 |
seed = random.randint(0, 999999)
|
183 |
+
negativeprompt = "blurry, cartoonish, anime, manga, stylized"
|
184 |
+
image = client_sd3.text_to_image(query, negative_prompt=f"{seed},{negativeprompt}")
|
185 |
yield gr.Image(image)
|
186 |
+
except:
|
187 |
+
image = image_gen(f"{str(query)}")
|
188 |
+
yield gr.Image(image[1])
|
189 |
elif json_data["name"] == "image_qna":
|
190 |
inputs = llava(message, history)
|
191 |
streamer = TextIteratorStreamer(processor, skip_prompt=True, **{"skip_special_tokens": True})
|