Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ with st.sidebar:
|
|
42 |
|
43 |
|
44 |
**How to Use**
|
45 |
-
|
46 |
|
47 |
|
48 |
**Usage Limits**
|
@@ -57,6 +57,10 @@ with st.sidebar:
|
|
57 |
To change the app's background color to white or black, click the three-dot menu on the right-hand side of your app, go to Settings and then Choose app theme, colors and fonts.
|
58 |
|
59 |
|
|
|
|
|
|
|
|
|
60 |
**File Handling and Errors**
|
61 |
The pie and bar charts are based only on reviews containing text. For any errors or inquiries, please contact us at [email protected]
|
62 |
|
@@ -210,9 +214,6 @@ st.button("Clear question", on_click=clear_question)
|
|
210 |
|
211 |
|
212 |
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
if st.button("Sentiment Analysis"):
|
217 |
if st.session_state['url_count'] < max_attempts:
|
218 |
if url:
|
@@ -234,24 +235,19 @@ if st.button("Sentiment Analysis"):
|
|
234 |
with tab3:
|
235 |
st.plotly_chart(fig3)
|
236 |
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
with zipfile.ZipFile(buf, "w") as myzip:
|
242 |
-
myzip.writestr("Summary of the results.csv", df1.to_csv(index=False))
|
243 |
-
with stylable_container(
|
244 |
key="download_button",
|
245 |
css_styles="""button { background-color: yellow; border: 1px solid black; padding: 5px; color: black; }""",
|
246 |
):
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
)
|
253 |
-
|
254 |
-
|
255 |
else:
|
256 |
st.warning("Failed to scrape reviews.")
|
257 |
update_url_count()
|
@@ -261,7 +257,10 @@ if st.button("Sentiment Analysis"):
|
|
261 |
st.warning(f"You have reached the maximum URL attempts ({max_attempts}).")
|
262 |
|
263 |
st.write(f"URL pasted {st.session_state['url_count']} times.")
|
264 |
-
|
|
|
|
|
|
|
265 |
|
266 |
|
267 |
|
|
|
42 |
|
43 |
|
44 |
**How to Use**
|
45 |
+
This app works with the URL of the Google Maps Reviews. Paste the URL and press the 'Sentiment Analysis' button to perform sentiment analysis on your Google Maps Reviews.
|
46 |
|
47 |
|
48 |
**Usage Limits**
|
|
|
57 |
To change the app's background color to white or black, click the three-dot menu on the right-hand side of your app, go to Settings and then Choose app theme, colors and fonts.
|
58 |
|
59 |
|
60 |
+
**Charts**
|
61 |
+
Hover to interact with and download the charts.
|
62 |
+
|
63 |
+
|
64 |
**File Handling and Errors**
|
65 |
The pie and bar charts are based only on reviews containing text. For any errors or inquiries, please contact us at [email protected]
|
66 |
|
|
|
214 |
|
215 |
|
216 |
|
|
|
|
|
|
|
217 |
if st.button("Sentiment Analysis"):
|
218 |
if st.session_state['url_count'] < max_attempts:
|
219 |
if url:
|
|
|
235 |
with tab3:
|
236 |
st.plotly_chart(fig3)
|
237 |
|
238 |
+
buf = io.BytesIO()
|
239 |
+
with zipfile.ZipFile(buf, "w") as myzip:
|
240 |
+
myzip.writestr("Summary of the results.csv", df1.to_csv(index=False))
|
241 |
+
with stylable_container(
|
|
|
|
|
|
|
242 |
key="download_button",
|
243 |
css_styles="""button { background-color: yellow; border: 1px solid black; padding: 5px; color: black; }""",
|
244 |
):
|
245 |
+
st.download_button(
|
246 |
+
label="Download zip file",
|
247 |
+
data=buf.getvalue(),
|
248 |
+
file_name="zip_file.zip",
|
249 |
+
mime="application/zip",
|
250 |
)
|
|
|
|
|
251 |
else:
|
252 |
st.warning("Failed to scrape reviews.")
|
253 |
update_url_count()
|
|
|
257 |
st.warning(f"You have reached the maximum URL attempts ({max_attempts}).")
|
258 |
|
259 |
st.write(f"URL pasted {st.session_state['url_count']} times.")
|
260 |
+
|
261 |
+
|
262 |
+
|
263 |
+
|
264 |
|
265 |
|
266 |
|