Spaces:
Running
on
Zero
Running
on
Zero
update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import traceback
|
2 |
import logging
|
3 |
from typing import Optional
|
4 |
import spaces
|
@@ -259,9 +258,9 @@ def process(
|
|
259 |
logger.info("finish processing")
|
260 |
return image_som, str(parsed_content_list)
|
261 |
except Exception as e:
|
262 |
-
|
263 |
-
|
264 |
-
return image_input,
|
265 |
|
266 |
logger.info("Starting App.")
|
267 |
with gr.Blocks() as demo:
|
|
|
|
|
1 |
import logging
|
2 |
from typing import Optional
|
3 |
import spaces
|
|
|
258 |
logger.info("finish processing")
|
259 |
return image_som, str(parsed_content_list)
|
260 |
except Exception as e:
|
261 |
+
error_message = str(e)
|
262 |
+
logger.info(error_message)
|
263 |
+
return image_input, error_message
|
264 |
|
265 |
logger.info("Starting App.")
|
266 |
with gr.Blocks() as demo:
|