davanstrien HF Staff commited on
Commit
49ef0df
·
1 Parent(s): c96eba4

only return html

Browse files
Files changed (1) hide show
  1. app.py +8 -7
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 JSONResponse(
121
- content={
122
- "html": html_text,
123
- "model_matches": model_matches,
124
- "dataset_matches": dataset_matches,
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):