Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,12 +81,14 @@ def parse_body(text, content_type=""):
|
|
| 81 |
return {
|
| 82 |
"_type": "html",
|
| 83 |
"_length": len(text),
|
|
|
|
| 84 |
"_preview": text[:300].strip() + ("..." if len(text) > 300 else ""),
|
| 85 |
}
|
| 86 |
if len(text) > 2000:
|
| 87 |
return {
|
| 88 |
"_type": "text",
|
| 89 |
"_length": len(text),
|
|
|
|
| 90 |
"_preview": text[:500].strip() + "...",
|
| 91 |
}
|
| 92 |
return text
|
|
@@ -342,4 +344,4 @@ def proxy_batch():
|
|
| 342 |
|
| 343 |
|
| 344 |
if __name__ == "__main__":
|
| 345 |
-
app.run(host="0.0.0.0", port=7860)
|
|
|
|
| 81 |
return {
|
| 82 |
"_type": "html",
|
| 83 |
"_length": len(text),
|
| 84 |
+
"content": text,
|
| 85 |
"_preview": text[:300].strip() + ("..." if len(text) > 300 else ""),
|
| 86 |
}
|
| 87 |
if len(text) > 2000:
|
| 88 |
return {
|
| 89 |
"_type": "text",
|
| 90 |
"_length": len(text),
|
| 91 |
+
"content": text,
|
| 92 |
"_preview": text[:500].strip() + "...",
|
| 93 |
}
|
| 94 |
return text
|
|
|
|
| 344 |
|
| 345 |
|
| 346 |
if __name__ == "__main__":
|
| 347 |
+
app.run(host="0.0.0.0", port=7860)
|