Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -81,7 +81,7 @@ async def generate_report(query: QueryModel):
|
|
81 |
search_query = re.sub(r'[^\w\s]', '', description).strip()
|
82 |
try:
|
83 |
urls, optimized_search_query = search_brave(search_query, num_results=8)
|
84 |
-
all_text_with_urls = fetch_and_extract_content(data_format, urls,
|
85 |
additional_context = limit_tokens(str(all_text_with_urls))
|
86 |
prompt = f"#### Write a comprehensive answer to the question:{description} #### USE THE SCRAPED DATA FOR CONTEXT:{additional_context}"
|
87 |
except Exception as e:
|
|
|
81 |
search_query = re.sub(r'[^\w\s]', '', description).strip()
|
82 |
try:
|
83 |
urls, optimized_search_query = search_brave(search_query, num_results=8)
|
84 |
+
all_text_with_urls = fetch_and_extract_content(data_format, urls, description)
|
85 |
additional_context = limit_tokens(str(all_text_with_urls))
|
86 |
prompt = f"#### Write a comprehensive answer to the question:{description} #### USE THE SCRAPED DATA FOR CONTEXT:{additional_context}"
|
87 |
except Exception as e:
|