Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Hide debug_info from API output
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def convert(s: str, theme: Literal["light", "dark"], debug_info: str) -> str:
|
|
| 30 |
)
|
| 31 |
except nbformat.reader.NotJSONError:
|
| 32 |
print(400, f"Notebook is not JSON. {debug_info}")
|
| 33 |
-
raise HTTPException(400, f"Notebook is not JSON.
|
| 34 |
except ValidationError as e:
|
| 35 |
print(
|
| 36 |
400,
|
|
@@ -38,7 +38,7 @@ def convert(s: str, theme: Literal["light", "dark"], debug_info: str) -> str:
|
|
| 38 |
)
|
| 39 |
raise HTTPException(
|
| 40 |
400,
|
| 41 |
-
f"Notebook is invalid according to nbformat: {e}.
|
| 42 |
)
|
| 43 |
|
| 44 |
print(f"Input: nbformat v{notebook_node.nbformat}.{notebook_node.nbformat_minor}")
|
|
|
|
| 30 |
)
|
| 31 |
except nbformat.reader.NotJSONError:
|
| 32 |
print(400, f"Notebook is not JSON. {debug_info}")
|
| 33 |
+
raise HTTPException(400, f"Notebook is not JSON.")
|
| 34 |
except ValidationError as e:
|
| 35 |
print(
|
| 36 |
400,
|
|
|
|
| 38 |
)
|
| 39 |
raise HTTPException(
|
| 40 |
400,
|
| 41 |
+
f"Notebook is invalid according to nbformat: {e}.",
|
| 42 |
)
|
| 43 |
|
| 44 |
print(f"Input: nbformat v{notebook_node.nbformat}.{notebook_node.nbformat_minor}")
|