Julian Vanecek commited on
Commit
7b363cb
·
1 Parent(s): 63ca36c

Fix Gradio compatibility issues

Browse files

- Remove type='messages' from Chatbot component
- Use Gradio 4.19.2 which is stable with Python 3.10
- Add simple test app for debugging
- Simplify requirements

Files changed (3) hide show
  1. app_simple.py +23 -0
  2. py/frontend/gradio_app.py +1 -2
  3. requirements.txt +3 -10
app_simple.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Simple Gradio app for HuggingFace Spaces
3
+ """
4
+ import gradio as gr
5
+ import os
6
+ import sys
7
+
8
+ # Add py directory to path
9
+ sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'py'))
10
+
11
+ def chat(message, history):
12
+ """Simple echo function for testing"""
13
+ return f"Echo: {message}"
14
+
15
+ # Create simple interface
16
+ demo = gr.ChatInterface(
17
+ fn=chat,
18
+ title="AI Assistant Multi-Agent System",
19
+ description="A multi-agent conversational AI system (simplified for testing)"
20
+ )
21
+
22
+ if __name__ == "__main__":
23
+ demo.launch()
py/frontend/gradio_app.py CHANGED
@@ -552,8 +552,7 @@ class PeerToPeerApp:
552
  height=500,
553
  show_label=False,
554
  elem_id="chatbot",
555
- bubble_full_width=False,
556
- type="messages"
557
  )
558
 
559
  msg = gr.Textbox(
 
552
  height=500,
553
  show_label=False,
554
  elem_id="chatbot",
555
+ bubble_full_width=False
 
556
  )
557
 
558
  msg = gr.Textbox(
requirements.txt CHANGED
@@ -1,9 +1,9 @@
1
  # Core dependencies
 
2
  openai
3
- gradio
4
  tiktoken
5
 
6
- # LangChain (without ChromaDB)
7
  langchain
8
  langchain-openai
9
  langchain-community
@@ -13,14 +13,7 @@ numpy
13
 
14
  # Utilities
15
  python-dotenv
16
- packaging
17
- tqdm
18
- PyYAML
19
  pydantic
20
  pydantic-settings
21
  SQLAlchemy
22
-
23
- # Development dependencies (optional)
24
- # pytest
25
- # black
26
- # pylint
 
1
  # Core dependencies
2
+ gradio==4.19.2
3
  openai
 
4
  tiktoken
5
 
6
+ # LangChain
7
  langchain
8
  langchain-openai
9
  langchain-community
 
13
 
14
  # Utilities
15
  python-dotenv
 
 
 
16
  pydantic
17
  pydantic-settings
18
  SQLAlchemy
19
+ PyYAML