ResearchEngineering commited on
Commit
972ba0d
·
verified ·
1 Parent(s): 200ce84

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +7 -4
src/streamlit_app.py CHANGED
@@ -44,14 +44,14 @@ st.altair_chart(alt.Chart(df, height=700, width=700)
44
  '''
45
 
46
 
47
- '''
48
  import streamlit as st
49
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
50
  import torch
51
  import torch.nn.functional as F
52
  import os
53
 
54
- st.set_page_config(page_title="FinBERT Sentiment", layout="centered")
55
  st.title("💰 FinBERT: Financial Sentiment Analysis")
56
  st.markdown("Модель: `yiyanghkust/finbert-tone` — обучена на финансовых текстах")
57
 
@@ -79,9 +79,9 @@ if st.button("Анализировать тональность") and text.strip
79
  for label, prob in zip(labels, probs):
80
  st.write(f"**{label}:** {prob.item():.3f}")
81
 
82
- '''
83
 
84
 
 
85
  import streamlit as st
86
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
87
  import torch
@@ -441,4 +441,7 @@ st.markdown("""
441
  <p>💡 <strong>Tip:</strong> For best results, use complete sentences and financial context</p>
442
  <p>Built with Streamlit • Powered by FinBERT</p>
443
  </div>
444
- """, unsafe_allow_html=True)
 
 
 
 
44
  '''
45
 
46
 
47
+
48
  import streamlit as st
49
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
50
  import torch
51
  import torch.nn.functional as F
52
  import os
53
 
54
+ st.set_page_config(page_title="💰 FinBERT: Financial Sentiment Analysis", layout="centered")
55
  st.title("💰 FinBERT: Financial Sentiment Analysis")
56
  st.markdown("Модель: `yiyanghkust/finbert-tone` — обучена на финансовых текстах")
57
 
 
79
  for label, prob in zip(labels, probs):
80
  st.write(f"**{label}:** {prob.item():.3f}")
81
 
 
82
 
83
 
84
+ '''
85
  import streamlit as st
86
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
87
  import torch
 
441
  <p>💡 <strong>Tip:</strong> For best results, use complete sentences and financial context</p>
442
  <p>Built with Streamlit • Powered by FinBERT</p>
443
  </div>
444
+ """, unsafe_allow_html=True)
445
+
446
+ '''
447
+