Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -137,6 +137,7 @@ async def generate_report(query: QueryModel):
|
|
| 137 |
messages = [{"role": 'user', "content": prompt}]
|
| 138 |
md_report_chart = extract_data_from_tag(openrouter_response(messages, model="anthropic/claude-3.5-sonnet"),"report")
|
| 139 |
html_report = md_to_html(md_report_chart)
|
|
|
|
| 140 |
|
| 141 |
except Exception as e:
|
| 142 |
print(e)
|
|
@@ -149,7 +150,7 @@ async def generate_report(query: QueryModel):
|
|
| 149 |
references_html[url] = str(md_to_html(text))
|
| 150 |
|
| 151 |
return {
|
| 152 |
-
"report":
|
| 153 |
"references": references_html,
|
| 154 |
"search_query": optimized_search_query
|
| 155 |
}
|
|
|
|
| 137 |
messages = [{"role": 'user', "content": prompt}]
|
| 138 |
md_report_chart = extract_data_from_tag(openrouter_response(messages, model="anthropic/claude-3.5-sonnet"),"report")
|
| 139 |
html_report = md_to_html(md_report_chart)
|
| 140 |
+
print(html_report)
|
| 141 |
|
| 142 |
except Exception as e:
|
| 143 |
print(e)
|
|
|
|
| 150 |
references_html[url] = str(md_to_html(text))
|
| 151 |
|
| 152 |
return {
|
| 153 |
+
"report": html_report,
|
| 154 |
"references": references_html,
|
| 155 |
"search_query": optimized_search_query
|
| 156 |
}
|