Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,6 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
from PIL import Image
|
| 3 |
from io import BytesIO
|
| 4 |
import torch
|
|
@@ -25,5 +27,5 @@ def generate_image(prompt: str, secret: str):
|
|
| 25 |
|
| 26 |
return buffer
|
| 27 |
|
| 28 |
-
iface = gr.Interface(fn=generate_image, inputs=[
|
| 29 |
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from gradio.inputs import Textbox
|
| 3 |
+
|
| 4 |
from PIL import Image
|
| 5 |
from io import BytesIO
|
| 6 |
import torch
|
|
|
|
| 27 |
|
| 28 |
return buffer
|
| 29 |
|
| 30 |
+
iface = gr.Interface(fn=generate_image, inputs=[Textbox(label="prompt"), Textbox(label="secret")], outputs="bytes")
|
| 31 |
iface.launch()
|