Spaces:
Running
Running
File size: 733 Bytes
5292e0d 93e15af 5292e0d 0daff2d 93e15af cae2767 5292e0d |
1 2 3 4 5 6 7 8 9 10 11 12 |
import gradio as gr
def predict(source, translation1, translation2):
model_input = "Source: {} Translation 0: {} Translation 1: {}".format(source, translation1, translation2)
return {'Translation 1': 0.70, 'Translation 2': 0.30}
source_textbox = gr.Textbox(label="Source", info="Source Sentence", value="Le chat est sur la tapis.")
translation1_textbox = gr.Textbox(label="Translation 1", info="Translation 1", value="The cat is on the bed.")
translation2_textbox = gr.Textbox(label="Translation 2", info="Translation 2", value="The cat is on the carpet.")
output = gr.Label(label="Result")
iface = gr.Interface(fn=predict, inputs=[source_textbox, translation1_textbox, translation2_textbox], outputs=output)
iface.launch() |