Spaces:
Runtime error
Runtime error
import gradio as gr | |
api = gr.Interface.load("models/Linaqruf/anything-v3.0") | |
def model(prompt, ngPrompt): | |
data = [prompt, ngPrompt] | |
paramsList = [a for a in data if a != ""] | |
result = api(paramsList) | |
print(result) | |
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() |