Howosn commited on
Commit
4c59735
1 Parent(s): 75c7e73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,12 +1,14 @@
1
- pip install transformers[sentencepiece]
2
  import streamlit as st
3
  from transformers import pipeline
 
4
 
 
 
5
 
6
  # Load the summarization & translation model pipeline
7
  tran_sum_pipe = pipeline("translation", model='utrobinmv/t5_summary_en_ru_zh_base_2048',return_all_scores=True)
8
  sentiment_pipeline = pipeline("text-classification", model='Howosn/Sentiment_Model',return_all_scores=True)
9
- #tokenizer = AutoTokenizer.from_pretrained('Howosn/Sentiment_Model', use_fast=False)
10
 
11
  # Streamlit application title
12
  st.title("Emotion analysis")
 
 
1
  import streamlit as st
2
  from transformers import pipeline
3
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
4
 
5
+ #tokenizer = AutoTokenizer.from_pretrained("mrm8488/distilroberta-finetuned-financial-news-sentiment-analysis")
6
+ #model = AutoModelForSequenceClassification.from_pretrained("Howosn/Sentiment_Model")
7
 
8
  # Load the summarization & translation model pipeline
9
  tran_sum_pipe = pipeline("translation", model='utrobinmv/t5_summary_en_ru_zh_base_2048',return_all_scores=True)
10
  sentiment_pipeline = pipeline("text-classification", model='Howosn/Sentiment_Model',return_all_scores=True)
11
+ tokenizer = T5Tokenizer.from_pretrained('utrobinmv/t5_summary_en_ru_zh_base_2048')
12
 
13
  # Streamlit application title
14
  st.title("Emotion analysis")