adithya-s-k / adithya-s-k/omniparse
Using the Colab Notebook Gradio App fails
- Lenguaje dominante
- Python
- Estrellas
- 7.9k
- Forks
- 676
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Very interesting project. Tried to spin it up from the Colab Notebook to compare the performance compared to commercial solutions but have been unable to get it to work at all.
The app goes through the steps below then throws an error:
```
Detecting bboxes: 100% 10/10 [00:12<00:00, 1.21s/it]
Recognizing Text: 100% 60/60 [01:39<00:00, 1.66s/it]
Detecting bboxes: 100% 7/7 [00:12<00:00, 1.79s/it]
Finding reading order: 100% 7/7 [00:07<00:00, 1.09s/it]
```
**Here is the Traceback:**
```
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/content/omniparse/omniparse/demo.py", line 193, in parse_document
document_response = response.json()
File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/queueing.py", line 541, in process_events
response = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/route_utils.py", line 276, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1928, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1514, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 833, in wrapper
response = f(*args, **kwargs)
File "/content/omniparse/omniparse/demo.py", line 204, in parse_document
raise gr.Error(f"Failed to parse: {e}")
gradio.exceptions.Error: 'Failed to parse: Expecting value: line 1 column 1 (char 0)'
```
Any help is appreciated!
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.