File size: 481 Bytes
9ceeeea
 
09b04d0
 
65c5efc
20bfbdf
95dc9eb
 
20bfbdf
09b04d0
021d2eb
 
 
 
51d51b1
19585c7
021d2eb
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr

api = gr.Interface.load("models/Linaqruf/anything-v3.0")

def model(prompt, ngPrompt):
    data = [prompt, ngPrompt]
    list = [a for a in data if a != ""]
    result = api(list)
    return result

with gr.Blocks() as anything:
    prompt = gr.Textbox(label="Prompt")
    ngPrompt = gr.Textbox(label="Negative Prompt")
    btn = gr.Button(value="Submit")
    image = gr.Image()
    btn.click(model, inputs=[prompt, ngPrompt], outputs=image)

anything.launch()