Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -155,7 +155,7 @@ with gr.Blocks() as demo:
|
|
155 |
def process_paragraph_2_sum(paragraph):
|
156 |
try:
|
157 |
paragraph_index = int(paragraph.split(':')[0].replace('Paragraph ', '')) - 1
|
158 |
-
selected_paragraph =
|
159 |
summary = summarize_text(selected_paragraph)
|
160 |
return summary
|
161 |
except (IndexError, ValueError):
|
@@ -163,7 +163,7 @@ with gr.Blocks() as demo:
|
|
163 |
def process_paragraph_2_sent(paragraph):
|
164 |
try:
|
165 |
paragraph_index = int(paragraph.split(':')[0].replace('Paragraph ', '')) - 1
|
166 |
-
selected_paragraph =
|
167 |
sentiment = text_to_sentiment(selected_paragraph)
|
168 |
|
169 |
return sentiment
|
|
|
155 |
def process_paragraph_2_sum(paragraph):
|
156 |
try:
|
157 |
paragraph_index = int(paragraph.split(':')[0].replace('Paragraph ', '')) - 1
|
158 |
+
selected_paragraph = stored_paragraphs_2[paragraph_index]
|
159 |
summary = summarize_text(selected_paragraph)
|
160 |
return summary
|
161 |
except (IndexError, ValueError):
|
|
|
163 |
def process_paragraph_2_sent(paragraph):
|
164 |
try:
|
165 |
paragraph_index = int(paragraph.split(':')[0].replace('Paragraph ', '')) - 1
|
166 |
+
selected_paragraph = stored_paragraphs_2[paragraph_index]
|
167 |
sentiment = text_to_sentiment(selected_paragraph)
|
168 |
|
169 |
return sentiment
|