Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
name = "runwayml/stable-diffusion-v1-5"
|
| 3 |
+
model = gr.Interface.load(f"models/{name}")
|
| 4 |
+
def im_fn(put):
|
| 5 |
+
return model(put)
|
| 6 |
+
with gr.Blocks() as b:
|
| 7 |
+
put = gr.Textbox()
|
| 8 |
+
out = gr.Image()
|
| 9 |
+
btn = gr.Button()
|
| 10 |
+
btn.click(im_fn,put,out)
|
| 11 |
+
b.queue(concurrency_count=100).launch()
|