Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,8 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
import torch
|
| 3 |
-
from diffusers import StableDiffusionPipeline
|
| 4 |
|
| 5 |
-
YOUR_TOKEN="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"
|
| 6 |
-
device = "cpu"
|
| 7 |
-
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=YOUR_TOKEN)
|
| 8 |
-
pipe.to(device)
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
|
|
|
| 12 |
|
| 13 |
gr.Interface(fn=process, inputs="text", outputs="text").launch()
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
|
| 5 |
+
def process(name) :
|
| 6 |
+
return "hello " + name
|
| 7 |
|
| 8 |
gr.Interface(fn=process, inputs="text", outputs="text").launch()
|