Closed sammcj closed 4 months ago
Ah, it looks like your requirements.txt is missing setuptools, after installing setuptools gradio states it's launched but throws an error:
Launching in *reload mode* on: http://127.0.0.1:7860 (Press CTRL+C to quit)
Watching: '/Users/samm/git/GraphRAG-Ollama-UI/.venv/lib/python3.12/site-packages/gradio', '/Users/samm/git/GraphRAG-Ollama-UI'
Process SpawnProcess-1:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/Users/samm/git/GraphRAG-Ollama-UI/.venv/lib/python3.12/site-packages/uvicorn/_subprocess.py", line 80, in subprocess_started
target(sockets=sockets)
File "/Users/samm/git/GraphRAG-Ollama-UI/.venv/lib/python3.12/site-packages/uvicorn/server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
File "/Users/samm/git/GraphRAG-Ollama-UI/.venv/lib/python3.12/site-packages/uvicorn/server.py", line 69, in serve
await self._serve(sockets)
File "/Users/samm/git/GraphRAG-Ollama-UI/.venv/lib/python3.12/site-packages/uvicorn/server.py", line 76, in _serve
config.load()
File "/Users/samm/git/GraphRAG-Ollama-UI/.venv/lib/python3.12/site-packages/uvicorn/config.py", line 434, in load
self.loaded_app = import_from_string(self.app)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/samm/git/GraphRAG-Ollama-UI/.venv/lib/python3.12/site-packages/uvicorn/importer.py", line 19, in import_from_string
module = importlib.import_module(module_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/Users/samm/git/GraphRAG-Ollama-UI/app.py", line 624, in <module>
with gr.Blocks(css=custom_css, theme=gr.themes.Base()) as demo:
^^^^^^^^^
AttributeError: module 'gradio' has no attribute 'themes'
Downgrading gradio to a really old version (gradio==3.41.2) works around the problem but that doesn't seem quite right 🤔
Hey!! Thanks for checking this out and raising the issue! The easiest way to avoid the distuls error is to use the latest Gradio version and launch the app with 'python app.py' instead of 'gradio app.py'. For some reason the reload and watch feature that comes with using the gradio flag instead of python for launching can not work do to the conda env. I usually run it with gradio app.py while development but it will work perfectly fine when launched the traditional python way
Hope that helps solve the issue! Everything should be pretty straightforward since it's the Microsoft graphrag repo with the extra gradio UI layered on top. Let me know if you're still encountering issues
Oh that's interesting, thanks for your response, nice work on the app!
Really neat looking project!
I went to try it out and hit the following error when trying to run gradio: