r-o-y-a commited on
Commit
14e082b
1 Parent(s): 9028292

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -24
app.py CHANGED
@@ -1,27 +1,4 @@
1
  import gradio as gr
2
 
3
- from transformers import pipeline
4
-
5
- english_translator = gr.load("models/arpanghoshal/EmoRoBERTa")
6
-
7
-
8
- def generate_text(text):
9
- text = english_translator(text)
10
- return text
11
-
12
-
13
- with gr.Blocks() as demo:
14
- with gr.Row():
15
- with gr.Column():
16
- seed = gr.Text(label="Input Phrase")
17
- with gr.Column():
18
- text = gr.Text(label="Generated Text")
19
- btn = gr.Button("Generate")
20
- btn.click(generate_text, inputs=[seed], outputs=[text])
21
-
22
- demo.launch()
23
-
24
-
25
-
26
-
27
 
 
 
1
  import gradio as gr
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ gr.load("models/arpanghoshal/EmoRoBERTa").launch()