Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,7 +86,7 @@ def main():
|
|
| 86 |
|
| 87 |
# Input: Query question for scoring and CSV file upload for candidate tweets
|
| 88 |
query_input = st.text_area("Enter your query question❔ for analysis (this does not need to be part of the CSV):")
|
| 89 |
-
uploaded_file = st.file_uploader(f"Upload Tweets CSV File🗄️ (must contain a '{tweets_column}' column)", type=["csv"])
|
| 90 |
|
| 91 |
candidate_docs = []
|
| 92 |
if uploaded_file is not None:
|
|
@@ -104,7 +104,7 @@ def main():
|
|
| 104 |
st.session_state.timer_started = False
|
| 105 |
st.session_state.timer_frozen = False
|
| 106 |
if uploaded_file is None:
|
| 107 |
-
st.error("Please upload a CSV file
|
| 108 |
elif not tweets_column.strip():
|
| 109 |
st.error("Please enter your column name")
|
| 110 |
elif not candidate_docs:
|
|
@@ -228,7 +228,7 @@ def main():
|
|
| 228 |
progress_bar.progress(75)
|
| 229 |
|
| 230 |
import random
|
| 231 |
-
max_tweets =
|
| 232 |
if len(scored_docs) > max_tweets:
|
| 233 |
sampled_docs = random.sample(scored_docs, max_tweets)
|
| 234 |
st.info(f"Sampling {max_tweets} out of {len(scored_docs)} tweets for report generation")
|
|
|
|
| 86 |
|
| 87 |
# Input: Query question for scoring and CSV file upload for candidate tweets
|
| 88 |
query_input = st.text_area("Enter your query question❔ for analysis (this does not need to be part of the CSV):")
|
| 89 |
+
uploaded_file = st.file_uploader(f"Upload Tweets CSV File🗄️ (must contain a '{tweets_column}' column with preferably <300 tweets)", type=["csv"])
|
| 90 |
|
| 91 |
candidate_docs = []
|
| 92 |
if uploaded_file is not None:
|
|
|
|
| 104 |
st.session_state.timer_started = False
|
| 105 |
st.session_state.timer_frozen = False
|
| 106 |
if uploaded_file is None:
|
| 107 |
+
st.error("Please upload a CSV file🗄️.")
|
| 108 |
elif not tweets_column.strip():
|
| 109 |
st.error("Please enter your column name")
|
| 110 |
elif not candidate_docs:
|
|
|
|
| 228 |
progress_bar.progress(75)
|
| 229 |
|
| 230 |
import random
|
| 231 |
+
max_tweets = 300
|
| 232 |
if len(scored_docs) > max_tweets:
|
| 233 |
sampled_docs = random.sample(scored_docs, max_tweets)
|
| 234 |
st.info(f"Sampling {max_tweets} out of {len(scored_docs)} tweets for report generation")
|