Spaces:
Sleeping
Sleeping
Commit ·
49ef0df
1
Parent(s): c96eba4
only return html
Browse files
app.py
CHANGED
|
@@ -117,13 +117,14 @@ async def convert_from_url(req: Request):
|
|
| 117 |
html_text, model_matches, dataset_matches = convert(
|
| 118 |
r.text, theme=theme, debug_info=f"url={url}"
|
| 119 |
)
|
| 120 |
-
return
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
|
|
|
| 127 |
|
| 128 |
|
| 129 |
async def convert_from_upload(req: Request):
|
|
|
|
| 117 |
html_text, model_matches, dataset_matches = convert(
|
| 118 |
r.text, theme=theme, debug_info=f"url={url}"
|
| 119 |
)
|
| 120 |
+
return HTMLResponse(content=html_text)
|
| 121 |
+
# return JSONResponse(
|
| 122 |
+
# content={
|
| 123 |
+
# "html": html_text,
|
| 124 |
+
# "model_matches": model_matches,
|
| 125 |
+
# "dataset_matches": dataset_matches,
|
| 126 |
+
# }
|
| 127 |
+
# )
|
| 128 |
|
| 129 |
|
| 130 |
async def convert_from_upload(req: Request):
|