Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
def
|
4 |
-
|
|
|
5 |
|
6 |
source_textbox = gr.Textbox(label="Source", info="Source Sentence", value="Le chat est sur la tapis.")
|
7 |
translation1_textbox = gr.Textbox(label="Translation 1", info="Translation 1", value="The cat is on the bed.")
|
8 |
translation2_textbox = gr.Textbox(label="Translation 2", info="Translation 2", value="The cat is on the carpet.")
|
9 |
-
output = gr.
|
10 |
-
iface = gr.Interface(fn=greet, inputs=[source_textbox, translation1_textbox, translation2_textbox], outputs=
|
11 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def predict(source, translation1, translation2):
|
4 |
+
model_input = "Source: {} Translation 0: {} Translation 1: {}".format(source, translation1, translation2)
|
5 |
+
return {'Translation 1': 0.70, 'Translation 2': 0.30}
|
6 |
|
7 |
source_textbox = gr.Textbox(label="Source", info="Source Sentence", value="Le chat est sur la tapis.")
|
8 |
translation1_textbox = gr.Textbox(label="Translation 1", info="Translation 1", value="The cat is on the bed.")
|
9 |
translation2_textbox = gr.Textbox(label="Translation 2", info="Translation 2", value="The cat is on the carpet.")
|
10 |
+
output = gr.Label(label="Result")
|
11 |
+
iface = gr.Interface(fn=greet, inputs=[source_textbox, translation1_textbox, translation2_textbox], outputs=output)
|
12 |
iface.launch()
|