dromerosm commited on
Commit
027b0a4
·
verified ·
1 Parent(s): 2aba08e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -40,7 +40,7 @@ def web_scrapper(url: str, topic: str) -> str:
40
  content = scraper.run()
41
 
42
  # Prepare the prompt for generating the summary
43
- prompt = f"Generate a summary of the following content on the topic ## {topic} ### \n\nCONTENT:\n\n" + content + "\nFollow this template:\n- Title:\nURL:\nSummary:"
44
 
45
  # Generate the summary using Cohere
46
  response = co.chat(
@@ -51,6 +51,13 @@ def web_scrapper(url: str, topic: str) -> str:
51
  chat_history=[],
52
  prompt_truncation='AUTO'
53
  )
 
 
 
 
 
 
 
54
 
55
  return response.text
56
 
 
40
  content = scraper.run()
41
 
42
  # Prepare the prompt for generating the summary
43
+ prompt = f"Generate a summary of the following content on the topic ## {topic} ### \n\nCONTENT:\n\n" + content
44
 
45
  # Generate the summary using Cohere
46
  response = co.chat(
 
51
  chat_history=[],
52
  prompt_truncation='AUTO'
53
  )
54
+
55
+ summary_response = f"""
56
+ ###
57
+ Summary: {response.text}
58
+ URL: {url}
59
+ ###
60
+ """
61
 
62
  return response.text
63