Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,15 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
| 3 |
text_to_image = gr.Interface.load("huggingface/runwayml/stable-diffusion-v1-5")
|
| 4 |
|
| 5 |
with gr.Blocks() as demo:
|
| 6 |
-
title = "Translate from
|
| 7 |
|
| 8 |
-
de_text = gr.Textbox(placeholder="
|
| 9 |
-
translate_btn = gr.Button("translate from
|
| 10 |
|
| 11 |
eng_text = gr.Textbox(label="ingilizce")
|
| 12 |
-
translate_btn.click(
|
| 13 |
|
| 14 |
text_to_image_btn = gr.Button("text to image")
|
| 15 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
trToEng = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-tr-en")
|
| 3 |
text_to_image = gr.Interface.load("huggingface/runwayml/stable-diffusion-v1-5")
|
| 4 |
|
| 5 |
with gr.Blocks() as demo:
|
| 6 |
+
title = "Translate from Turkish to English and English text to image"
|
| 7 |
|
| 8 |
+
de_text = gr.Textbox(placeholder="Türkçe cümle")
|
| 9 |
+
translate_btn = gr.Button("translate from Turkish to english")
|
| 10 |
|
| 11 |
eng_text = gr.Textbox(label="ingilizce")
|
| 12 |
+
translate_btn.click(trToEng, de_text, eng_text)
|
| 13 |
|
| 14 |
text_to_image_btn = gr.Button("text to image")
|
| 15 |
|