xp3857's picture
Update app.py
5c0f9d0
raw
history blame
No virus
485 Bytes
import gradio as gr
import requests
import os
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,negative_prompt = "blury")
elif h != o:
return(None)
with gr.Blocks() as b:
put = gr.Textbox()
out = gr.Image()
btn = gr.Button()
btn.click(im_fn,put,out)
b.queue(concurrency_count=100).launch()
ac()