File size: 983 Bytes
a83f80b
 
d564f5f
 
 
 
 
c49cab1
d564f5f
 
766e63e
7c020ac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import gradio as gr

README = """
    # Movie Review Score Discriminator
    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.
    ## Usage

"""


title = "Movie Review Score Discriminator"
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."
examples = ["the greatest musicians ", "cold movie "]


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

demo = gr.Interface.load("models/cardiffnlp/twitter-roberta-base-sentiment", inputs="text", outputs="text", 
                         title=title, theme="peach",
                         allow_flagging="auto",
                         description=description, examples=examples)
# demo = gr.Interface(fn=greet, inputs="text", outputs="text")
    
if __name__ == "__main__":
    demo.launch()