mdj1412 commited on
Commit
7c020ac
1 Parent(s): f7f31fa

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -4
app.py CHANGED
@@ -9,7 +9,19 @@ README = """
9
  """
10
 
11
 
12
- gr.Markdown(README)
13
- gr.Interface.load("models/cardiffnlp/twitter-roberta-base-sentiment",
14
- inputs=gr.Textbox(lines=5, label="Input Text")
15
- ).launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  """
10
 
11
 
12
+ title = "Movie Review Score Discriminator"
13
+ description = "It is a program that classifies whether it is positive or negative by entering movie reviews. You can choose between the Korean version and the English version."
14
+ examples = ["the greatest musicians ", "cold movie "]
15
+
16
+
17
+ def greet(name):
18
+ return "Hello " + name + "!"
19
+
20
+ demo = gr.Interface.load("models/cardiffnlp/twitter-roberta-base-sentiment", inputs="text", outputs="text",
21
+ title=title, theme="peach",
22
+ allow_flagging="auto",
23
+ description=description, examples=examples)
24
+ # demo = gr.Interface(fn=greet, inputs="text", outputs="text")
25
+
26
+ if __name__ == "__main__":
27
+ demo.launch()