Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -198,7 +198,7 @@ async def __convert2md(inp):
|
|
198 |
return await __convert_text(inp.encode(), "gfm-raw_html", "html")
|
199 |
|
200 |
async def __convert2plain(inp):
|
201 |
-
return await __convert_text(inp.encode(), "
|
202 |
|
203 |
def convert2md(req):
|
204 |
pass
|
@@ -627,7 +627,7 @@ async def llm_generate_text(request):
|
|
627 |
try:
|
628 |
repl = _r.json()['choices'][0]['message']['content']
|
629 |
# input, type_out="plain", type_in="html"
|
630 |
-
repl = await __convert_text(repl.encode(), "html
|
631 |
return PlainTextResponse(repl)
|
632 |
|
633 |
except Exception as e:
|
|
|
198 |
return await __convert_text(inp.encode(), "gfm-raw_html", "html")
|
199 |
|
200 |
async def __convert2plain(inp):
|
201 |
+
return await __convert_text(inp.encode(), "plain", "html")
|
202 |
|
203 |
def convert2md(req):
|
204 |
pass
|
|
|
627 |
try:
|
628 |
repl = _r.json()['choices'][0]['message']['content']
|
629 |
# input, type_out="plain", type_in="html"
|
630 |
+
repl = await __convert_text(repl.encode(), "html", "markdown")
|
631 |
return PlainTextResponse(repl)
|
632 |
|
633 |
except Exception as e:
|