KrSharangrav commited on
Commit
e603b31
·
1 Parent(s): bfd707a

changes in the ui

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -24,18 +24,18 @@ collection = get_mongo_client()
24
  st.title("📊 MongoDB Data Viewer with AI Sentiment Chatbot")
25
 
26
  # Show first 5 rows from MongoDB
27
- st.subheader("First 5 Rows from Database")
28
- data = list(collection.find({}, {"_id": 0}).limit(5))
29
 
30
- if data:
31
- st.write(pd.DataFrame(data))
32
- else:
33
- st.warning("⚠️ No data found. Try refreshing the app.")
34
 
35
  # Button to show full MongoDB data
36
- if st.button("Show Complete Data"):
37
- all_data = list(collection.find({}, {"_id": 0}))
38
- st.write(pd.DataFrame(all_data))
39
 
40
  #### **4. Load Sentiment Analysis Model (RoBERTa)**
41
  sentiment_pipeline = pipeline("sentiment-analysis", model="cardiffnlp/twitter-roberta-base-sentiment")
 
24
  st.title("📊 MongoDB Data Viewer with AI Sentiment Chatbot")
25
 
26
  # Show first 5 rows from MongoDB
27
+ #st.subheader("First 5 Rows from Database")
28
+ #data = list(collection.find({}, {"_id": 0}).limit(5))
29
 
30
+ #if data:
31
+ # st.write(pd.DataFrame(data))
32
+ #else:
33
+ # st.warning("⚠️ No data found. Try refreshing the app.")
34
 
35
  # Button to show full MongoDB data
36
+ #if st.button("Show Complete Data"):
37
+ # all_data = list(collection.find({}, {"_id": 0}))
38
+ # st.write(pd.DataFrame(all_data))
39
 
40
  #### **4. Load Sentiment Analysis Model (RoBERTa)**
41
  sentiment_pipeline = pipeline("sentiment-analysis", model="cardiffnlp/twitter-roberta-base-sentiment")