Update app.py
Browse files
app.py
CHANGED
|
@@ -173,9 +173,9 @@ def process_webpage(url):
|
|
| 173 |
summary = summary_response.choices[0].message.content.strip()
|
| 174 |
perspectives = perspectives_response.choices[0].message.content.strip()
|
| 175 |
|
| 176 |
-
return hotlink, summary, perspectives
|
| 177 |
except Exception as e:
|
| 178 |
-
return f"Error fetching or processing content: {str(e)}", "", ""
|
| 179 |
|
| 180 |
|
| 181 |
# In[31]:
|
|
@@ -355,12 +355,12 @@ with gr.Blocks() as demo:
|
|
| 355 |
fetch_btn.click(
|
| 356 |
process_webpage,
|
| 357 |
inputs=url_input,
|
| 358 |
-
outputs=[title_output, summary_output, perspectives_output],
|
| 359 |
)
|
| 360 |
|
| 361 |
chatbot_btn.click(
|
| 362 |
chat_with_ai,
|
| 363 |
-
inputs=[chatbot_history_gr, user_input,
|
| 364 |
outputs=chatbot_history_gr,
|
| 365 |
)
|
| 366 |
|
|
|
|
| 173 |
summary = summary_response.choices[0].message.content.strip()
|
| 174 |
perspectives = perspectives_response.choices[0].message.content.strip()
|
| 175 |
|
| 176 |
+
return hotlink, summary, perspectives, rendered_content
|
| 177 |
except Exception as e:
|
| 178 |
+
return f"Error fetching or processing content: {str(e)}", "", "", ""
|
| 179 |
|
| 180 |
|
| 181 |
# In[31]:
|
|
|
|
| 355 |
fetch_btn.click(
|
| 356 |
process_webpage,
|
| 357 |
inputs=url_input,
|
| 358 |
+
outputs=[title_output, summary_output, perspectives_output, fulltext_output],
|
| 359 |
)
|
| 360 |
|
| 361 |
chatbot_btn.click(
|
| 362 |
chat_with_ai,
|
| 363 |
+
inputs=[chatbot_history_gr, user_input, fulltext_output],
|
| 364 |
outputs=chatbot_history_gr,
|
| 365 |
)
|
| 366 |
|