Spaces:
Sleeping
Sleeping
fix: patch gradio bool schema bug + clean launch for HF Spaces
Browse files7 unmodified lines8910111213196 unmodified lines2102112122132142157 unmodified linesimport pypdfimport spaces # required for ZeroGPU# ββ Global state ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββrag = RAGPipeline()tools = get_tools(rag)196 unmodified linesbtn_explain.click(lambda h, m: quick_action("Explain this code", h, m), inputs=[chatbot, mode], outputs=[chatbot, msg])if __name__ == "__main__":demo.launch(server_name="0.0.0.0", server_port=7860, show_api=False)7 unmodified lines8910111213141516171819202122196 unmodified lines2192202212222232247 unmodified linesimport pypdfimport spaces # required for ZeroGPU# Patch gradio 4.44.0 bool schema bugimport gradio_client.utils as _gcu_original_get_type = _gcu.get_typedef _patched_get_type(schema):if isinstance(schema, bool):return "bool"return _original_get_type(schema)_gcu.get_type = _patched_get_type# ββ Global state ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββrag = RAGPipeline()tools = get_tools(rag)196 unmodified linesbtn_explain.click(lambda h, m: quick_action("Explain this code", h, m), inputs=[chatbot, mode], outputs=[chatbot, msg])if __name__ == "__main__":demo.launch()
app.py+10-1