Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,12 +2,12 @@ import os
|
|
| 2 |
os.system('pip install gradio==2.8.0b22')
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
-
fastspeech = gr.Interface.load("huggingface/facebook/fastspeech2-en-ljspeech")
|
| 6 |
clip = gr.Interface.load("spaces/DrishtiSharma/Text-to-Image-search-using-CLIP")
|
| 7 |
|
| 8 |
|
| 9 |
-
def text2speech(text):
|
| 10 |
-
|
| 11 |
|
| 12 |
|
| 13 |
def text2image(text):
|
|
@@ -20,18 +20,18 @@ block = gr.Blocks()
|
|
| 20 |
|
| 21 |
|
| 22 |
with block:
|
| 23 |
-
text = gr.inputs.Textbox(placeholder="
|
| 24 |
|
| 25 |
with gr.Column():
|
| 26 |
with gr.Row():
|
| 27 |
-
get_audio = gr.Button("generate audio")
|
| 28 |
get_image = gr.Button("generate image")
|
| 29 |
with gr.Row():
|
| 30 |
-
speech = gr.outputs.Audio()
|
| 31 |
image = gr.outputs.Image()
|
| 32 |
|
| 33 |
|
| 34 |
-
get_audio.click(text2speech, inputs=text, outputs=speech)
|
| 35 |
get_image.click(text2image, inputs=text, outputs=image)
|
| 36 |
|
| 37 |
block.launch()
|
|
|
|
| 2 |
os.system('pip install gradio==2.8.0b22')
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
+
#fastspeech = gr.Interface.load("huggingface/facebook/fastspeech2-en-ljspeech")
|
| 6 |
clip = gr.Interface.load("spaces/DrishtiSharma/Text-to-Image-search-using-CLIP")
|
| 7 |
|
| 8 |
|
| 9 |
+
#def text2speech(text):
|
| 10 |
+
# return fastspeech(text)
|
| 11 |
|
| 12 |
|
| 13 |
def text2image(text):
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
with block:
|
| 23 |
+
text = gr.inputs.Textbox(placeholder="Enter the words you want to generate image for::::::")
|
| 24 |
|
| 25 |
with gr.Column():
|
| 26 |
with gr.Row():
|
| 27 |
+
#get_audio = gr.Button("generate audio")
|
| 28 |
get_image = gr.Button("generate image")
|
| 29 |
with gr.Row():
|
| 30 |
+
#speech = gr.outputs.Audio()
|
| 31 |
image = gr.outputs.Image()
|
| 32 |
|
| 33 |
|
| 34 |
+
#get_audio.click(text2speech, inputs=text, outputs=speech)
|
| 35 |
get_image.click(text2image, inputs=text, outputs=image)
|
| 36 |
|
| 37 |
block.launch()
|