broadfield-dev commited on
Commit
b16d387
·
verified ·
1 Parent(s): f04e79d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,13 +10,13 @@ model = "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B"
10
  #nlp = pipeline("question-answering")
11
  #summarizer = pipeline("summarization")
12
  nlp = pipeline(model=model)
13
- summarizer = pipeline(model=model)
14
 
15
  def fetch_and_summarize(url):
16
  response = requests.get(url)
17
  soup = BeautifulSoup(response.text, 'html.parser')
18
  content = soup.get_text()
19
- summary = summarizer(content[:10000]) # Limit content to avoid overwhelming the model
20
  print(summary)
21
  print(summary[0])
22
  return summary[0]['summary']
 
10
  #nlp = pipeline("question-answering")
11
  #summarizer = pipeline("summarization")
12
  nlp = pipeline(model=model)
13
+ #summarizer = pipeline(model=model)
14
 
15
  def fetch_and_summarize(url):
16
  response = requests.get(url)
17
  soup = BeautifulSoup(response.text, 'html.parser')
18
  content = soup.get_text()
19
+ summary = nlp(content[:10000]) # Limit content to avoid overwhelming the model
20
  print(summary)
21
  print(summary[0])
22
  return summary[0]['summary']