xp3857's picture
Update app.py
c0caa06
raw
history blame
No virus
591 Bytes
import gradio as gr
import requests
import os
name2 = "runwayml/stable-diffusion-v1-5"
name1 = "andite/anything-v4.0"
model = gr.Interface.load(f"models/{name2}")
o = os.getenv("P")
h = "Q"
def ac():
def im_fn(put):
if h == o:
print (put)
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()