Spaces:
Sleeping
Sleeping
Update app.py
Browse files142 unmodified lines143144145146147148149150151152153154155142 unmodified lineselif json_data["name"] == "image_generation":query = json_data["arguments"]["query"]gr.Info("Generating Image, Please wait 10 sec...")seed = random.randint(1, 99999)image = f""image = image.replace("\\n", "")image = image.replace(" ", "%20")yield imagetime.sleep(8)gr.Info("We are going to Update Our Image Generation Engine to more powerful ones in Next Update. ThankYou")elif json_data["name"] == "image_qna":inputs = llava(message, history)streamer = TextIteratorStreamer(processor, skip_prompt=True, **{"skip_special_tokens": True})142 unmodified lines143144145146147148149150151152153142 unmodified lineselif json_data["name"] == "image_generation":query = json_data["arguments"]["query"]gr.Info("Generating Image, Please wait 10 sec...")client = InferenceClient("stabilityai/stable-diffusion-3-medium-diffusers")seed = random.randint(0.999999)image = client.text_to_image(message_text, negative_prompt=f"{seed}")yield gr.Image(image)gr.Info("We are going to mor upgrade image generator in next update")elif json_data["name"] == "image_qna":inputs = llava(message, history)streamer = TextIteratorStreamer(processor, skip_prompt=True, **{"skip_special_tokens": True})
app.py+5-7