Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -277,8 +277,8 @@ def process_pdfs_and_analyze_sentiment(file1, file2, sheet):
|
|
| 277 |
text_pdf2 = "\n".join(sentences2)
|
| 278 |
|
| 279 |
# Perform sentiment analysis on the extracted sentences for each PDF
|
| 280 |
-
result_pdf1 =
|
| 281 |
-
result_pdf2 =
|
| 282 |
|
| 283 |
return result_pdf1, result_pdf2
|
| 284 |
#def change_choices(df):
|
|
@@ -547,10 +547,10 @@ with gr.Blocks(theme='gradio/soft',js=js_func) as demo:
|
|
| 547 |
|
| 548 |
with gr.Row():
|
| 549 |
with gr.Column():
|
| 550 |
-
sentiment_results_pdf1 = gr.HighlightedText(label="Sentiment Analysis - PDF 1",color_map=color_map)
|
| 551 |
|
| 552 |
with gr.Column():
|
| 553 |
-
sentiment_results_pdf2 = gr.HighlightedText(label="Sentiment Analysis - PDF 2",color_map=color_map)
|
| 554 |
|
| 555 |
with gr.Accordion("Adverse growth trends"):
|
| 556 |
with gr.Row():
|
|
|
|
| 277 |
text_pdf2 = "\n".join(sentences2)
|
| 278 |
|
| 279 |
# Perform sentiment analysis on the extracted sentences for each PDF
|
| 280 |
+
result_pdf1 = fin_ext(text_pdf1)
|
| 281 |
+
result_pdf2 = fin_ext(text_pdf2)
|
| 282 |
|
| 283 |
return result_pdf1, result_pdf2
|
| 284 |
#def change_choices(df):
|
|
|
|
| 547 |
|
| 548 |
with gr.Row():
|
| 549 |
with gr.Column():
|
| 550 |
+
sentiment_results_pdf1 = gr.HighlightedText(label="Sentiment Analysis - PDF 1",color_map=color_map, show_legend=True)
|
| 551 |
|
| 552 |
with gr.Column():
|
| 553 |
+
sentiment_results_pdf2 = gr.HighlightedText(label="Sentiment Analysis - PDF 2",color_map=color_map, show_legend=True)
|
| 554 |
|
| 555 |
with gr.Accordion("Adverse growth trends"):
|
| 556 |
with gr.Row():
|