xp3857's picture
Update app.py
ae91b03
raw
history blame
563 Bytes
import gradio as gr
import requests
import os
name2 = runwayml/stable-diffusion-v1-5
name = "andite/anything-v4.0"
model = gr.Interface.load(f"models/{name}")
o = os.getenv("P")
h = "Q"
def ac():
def im_fn(put):
if h == o:
return model(put)
elif h != o:
return(None)
with gr.Blocks() as b:
put = gr.Textbox()
with gr.Row():
out1 = gr.Image()
with gr.Row():
btn1 = gr.Button()
btn1.click(im_fn,put,out1)
b.queue(concurrency_count=100).launch()
ac()