Zainajabroh commited on
Commit
2c38b79
·
verified ·
1 Parent(s): eec5dc3

Update Discussion_Buddy.py

Browse files
Files changed (1) hide show
  1. Discussion_Buddy.py +1 -1
Discussion_Buddy.py CHANGED
@@ -106,7 +106,7 @@ def cleaning_text(text, is_lower_case = False):
106
  #Step 1 to classify, summary and get NER from news
107
  def extract_article(url):
108
  model = genai.GenerativeModel('gemini-1.5-pro')
109
- extract = model.generate_content(f"Extract the content from this news article: {url}, make sure extract all news part. Extract based on the news language used, if the news using Indonesia language just extract with Indonesian language, and so on if the news using english language. Make sure minimum is 300 words and maximum is 400 words").text
110
  return extract
111
  def process_news_pipeline(news_text, user_language):
112
  news_text = extract_article(news_text)
 
106
  #Step 1 to classify, summary and get NER from news
107
  def extract_article(url):
108
  model = genai.GenerativeModel('gemini-1.5-pro')
109
+ extract = model.generate_content(f"Extract the content from this news article: {url}, make sure extract all news part. Extract based on the news language used, if the news using Indonesia language just extract with Indonesian language, and so on if the news using english language. Make sure minimum is 200 words and maximum is 250 words").text
110
  return extract
111
  def process_news_pipeline(news_text, user_language):
112
  news_text = extract_article(news_text)