Spaces:
Build error
Build error
Commit
·
b11dbf8
1
Parent(s):
1a02476
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,25 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
|
4 |
+
# Load the Stable Diffusion TTS model
|
5 |
+
tts_demo = gr.Interface.load(
|
6 |
+
"models/runwayml/stable-diffusion-v1-5",
|
7 |
+
title=None,
|
8 |
+
description="Give me something to paint!"
|
9 |
+
)
|
10 |
|
11 |
+
# Load the text-to-image prompt generator model
|
12 |
+
stt_demo = gr.Interface.load(
|
13 |
+
"models/succinctly/text2image-prompt-generator",
|
14 |
+
title=None,
|
15 |
+
description="Let me try to guess what you're saying!"
|
16 |
+
)
|
17 |
+
|
18 |
+
# Load the image classification model
|
19 |
+
image_classification = pipeline("image-classification")
|
20 |
+
|
21 |
+
# Create the tabbed interface
|
22 |
+
demo = gr.TabbedInterface([tts_demo, stt_demo, gr.Interface.from_pipeline(image_classification)], ["Paint", "Text", "Image"])
|
23 |
+
|
24 |
+
# Launch the interface
|
25 |
+
demo.launch()
|