topguy commited on
Commit
b8aa004
·
1 Parent(s): 8198ac5

fix: Correct TypeError in Gradio app mounting

Browse files

The mount_gradio_app function was being used incorrectly. This commit replaces it with a FastAPI instance and mounts the Gradio app on top of it. Also adds a .gitignore file to exclude __pycache__ directories.

Files changed (2) hide show
  1. .gitignore +2 -0
  2. logviewer/app.py +4 -1
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ __pycache__/
2
+ logviewer/__pycache__/
logviewer/app.py CHANGED
@@ -215,7 +215,10 @@ with gr.Blocks(theme=gr.themes.Soft(), css="#log_content textarea { font-family:
215
  outputs=gr.File(label="Download Filtered Log")
216
  )
217
 
218
- app = gr.mount_gradio_app(demo, path="/")
 
 
 
219
 
220
  if __name__ == "__main__":
221
  import uvicorn
 
215
  outputs=gr.File(label="Download Filtered Log")
216
  )
217
 
218
+ from fastapi import FastAPI
219
+
220
+ app = FastAPI()
221
+ app = gr.mount_gradio_app(app, demo, path="/")
222
 
223
  if __name__ == "__main__":
224
  import uvicorn