oceankim commited on
Commit
644fc5a
1 Parent(s): e431b7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,7 @@ tokenizer = BertTokenizer.from_pretrained('ProsusAI/finbert')
8
  # Load pre-trained model
9
  model = BertForSequenceClassification.from_pretrained('ProsusAI/finbert')
10
 
11
- def analyze_sentiment(sec_text):
12
  # Encode the text
13
  tokens = tokenizer.encode_plus(sec_text, add_special_tokens=True, return_tensors="pt")
14
 
@@ -26,7 +26,7 @@ def analyze_sentiment(sec_text):
26
 
27
  # Define the Gradio interface
28
  gr_interface = gr.Interface(
29
- fn=analyze_sentiment,
30
  inputs=gr.Textbox(lines=1, placeholder="..."),
31
  outputs="text",
32
  title="Sentiment Analysis"
 
8
  # Load pre-trained model
9
  model = BertForSequenceClassification.from_pretrained('ProsusAI/finbert')
10
 
11
+ def get_sentiment(입력):
12
  # Encode the text
13
  tokens = tokenizer.encode_plus(sec_text, add_special_tokens=True, return_tensors="pt")
14
 
 
26
 
27
  # Define the Gradio interface
28
  gr_interface = gr.Interface(
29
+ fn=get_sentiment,
30
  inputs=gr.Textbox(lines=1, placeholder="..."),
31
  outputs="text",
32
  title="Sentiment Analysis"