File size: 564 Bytes
05e69cc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gradio as gr
import os
os.environ['NO_PROXY'] = '127.0.0.1'

class DummyAugmenter:
    def __init__(self, in_lang="en", out_lang="ru") -> None:
        pass
    def back_translate(self,text):
        return "La marche des vertueux est seumée d'obstacles"

def greet(name):
    return "Hello " + name + "!"

with gr.Blocks() as demo:
    name = gr.Textbox(label="Please type the text to paraphrase")
    output = gr.Textbox(label="Output Box")
    
    greet_btn = gr.Button("Greet")
    greet_btn.click(fn=greet, inputs=name, outputs=output)

demo.launch()