adityaiiitr commited on
Commit
85338db
·
verified ·
1 Parent(s): db5c3f6

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -33,7 +33,7 @@ async def scrape_visible_text(url):
33
 
34
  # Function to structure data using Google's Gemini model
35
  def structure_data(text, college_name):
36
- prompt = f"Convert the following unstructured text into a structured form with the titles and content containing the data. Don't incldue any kind of text formatting like bold, newline, etc. Properly structure tables and general text. The structured data should contain details only about the college named '{college_name}':\n{text}. Make sure the content include everything such as connectivity, placement, nearby, colleges, infrastructure, courses, branches, students, festivals, clubs, reviews, qna or any other college related parameters only if it is availabale in the above text."
37
  model = genai.GenerativeModel("gemini-1.5-pro")
38
  response = model.generate_content(prompt)
39
  return response.text.strip()
 
33
 
34
  # Function to structure data using Google's Gemini model
35
  def structure_data(text, college_name):
36
+ prompt = f"Convert the following unstructured text into a structured form with the titles and content containing the data. Don't incldue any kind of text formatting like bold, newline, etc. Properly structure tables and general text. The structured data should contain details only about the college named '{college_name}':\n{text}. Make sure the content include everything such as connectivity, placement, nearby, colleges, infrastructure, courses, branches, students, festivals, clubs, reviews, qna or any other college related parameters only if it is availabale in the above text. Give the response in json only!"
37
  model = genai.GenerativeModel("gemini-1.5-pro")
38
  response = model.generate_content(prompt)
39
  return response.text.strip()