Spaces:
Runtime error
Runtime error
import gradio as gr | |
api = gr.Interface.load("models/Linaqruf/anything-v3.0") | |
def model(prompt, ngPrompt): | |
if ngPrompt: | |
result = api([prompt, ngPrompt]) | |
return result | |
else: | |
result = api([prompt]) | |
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(fn=api, inputs=[prompt, ngPrompt], outputs=image) | |
anything.launch() |