Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -143,13 +143,11 @@ def respond(message, history):
|
|
143 |
elif json_data["name"] == "image_generation":
|
144 |
query = json_data["arguments"]["query"]
|
145 |
gr.Info("Generating Image, Please wait 10 sec...")
|
146 |
-
|
147 |
-
|
148 |
-
image =
|
149 |
-
|
150 |
-
|
151 |
-
time.sleep(8)
|
152 |
-
gr.Info("We are going to Update Our Image Generation Engine to more powerful ones in Next Update. ThankYou")
|
153 |
elif json_data["name"] == "image_qna":
|
154 |
inputs = llava(message, history)
|
155 |
streamer = TextIteratorStreamer(processor, skip_prompt=True, **{"skip_special_tokens": True})
|
|
|
143 |
elif json_data["name"] == "image_generation":
|
144 |
query = json_data["arguments"]["query"]
|
145 |
gr.Info("Generating Image, Please wait 10 sec...")
|
146 |
+
client = InferenceClient("stabilityai/stable-diffusion-3-medium-diffusers")
|
147 |
+
seed = random.randint(0.999999)
|
148 |
+
image = client.text_to_image(message_text, negative_prompt=f"{seed}")
|
149 |
+
yield gr.Image(image)
|
150 |
+
gr.Info("We are going to mor upgrade image generator in next update")
|
|
|
|
|
151 |
elif json_data["name"] == "image_qna":
|
152 |
inputs = llava(message, history)
|
153 |
streamer = TextIteratorStreamer(processor, skip_prompt=True, **{"skip_special_tokens": True})
|