File size: 591 Bytes
b6b08f6
3353a40
af2f25b
3353a40
4b7a185
 
 
b6eb1a4
 
af2f25b
ad1a1ef
a2ffcba
 
 
c0caa06
a12b518
a2ffcba
 
9391d90
a2ffcba
 
b6eb1a4
 
 
 
 
 
a2ffcba
af2f25b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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()