Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -77,7 +77,7 @@ async def scrape_visible_text(url):
|
|
77 |
def structure_data(text, college_name):
|
78 |
try:
|
79 |
logger.info(f"Starting to structure data for college: {college_name}")
|
80 |
-
prompt = f"Convert the following unstructured text into a well-written and comprehensive structured form with titles and content containing all relevant data. The response should be a detailed paragraph mentioning everything about the college named '{college_name}', ensuring no important information is missed. Include details such as connectivity, placement, nearby colleges, infrastructure, courses, branches, students, festivals, clubs, reviews, Q&A, and any other college-related parameters available in the text. Provide the response text with no formatting! --- \n{text} ---. Use only the text between the '---' markers as input source text. If information is not available about any specific thing dont mention
|
81 |
model = genai.GenerativeModel("gemini-1.5-pro")
|
82 |
response = model.generate_content(prompt)
|
83 |
logger.info(f"Successfully structured data for college: {college_name}")
|
|
|
77 |
def structure_data(text, college_name):
|
78 |
try:
|
79 |
logger.info(f"Starting to structure data for college: {college_name}")
|
80 |
+
prompt = f"Convert the following unstructured text into a well-written and comprehensive structured form with titles and content containing all relevant data. The response should be a detailed paragraph mentioning everything about the college named '{college_name}', ensuring no important information is missed. Include details such as connectivity, placement, nearby colleges, infrastructure, courses, branches, students, festivals, clubs, reviews, Q&A, and any other college-related parameters available in the text. Provide the response text with no formatting! --- \n{text} ---. Use only the text between the '---' markers as input source text. If information is not available about any specific thing dont mention its heading. Also try not to include table of contents and remove the repetitive information."
|
81 |
model = genai.GenerativeModel("gemini-1.5-pro")
|
82 |
response = model.generate_content(prompt)
|
83 |
logger.info(f"Successfully structured data for college: {college_name}")
|