Spaces:
Sleeping
Sleeping
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() |