KeviniveK commited on
Commit
b2e371b
·
verified ·
1 Parent(s): 9a6e916

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -1,10 +1,8 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
-
5
  def main():
6
- # 使用情感分析任务默认模型
7
- sentiment_pipeline = pipeline("sentiment-analysis")
8
 
9
  st.title("Sentiment Analysis with HuggingFace Spaces")
10
  st.write("Enter a sentence to analyze its sentiment:")
@@ -19,4 +17,4 @@ def main():
19
  st.write(f"Confidence: {confidence:.2f}")
20
 
21
  if __name__ == "__main__":
22
- main()
 
1
  import streamlit as st
2
  from transformers import pipeline
3
 
 
4
  def main():
5
+ sentiment_pipeline = pipeline(model="KeviniveK/CustomModel_IMDB")
 
6
 
7
  st.title("Sentiment Analysis with HuggingFace Spaces")
8
  st.write("Enter a sentence to analyze its sentiment:")
 
17
  st.write(f"Confidence: {confidence:.2f}")
18
 
19
  if __name__ == "__main__":
20
+ main()