admin08077 commited on
Commit
fb842c0
·
verified ·
1 Parent(s): 67b5004

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -8,6 +8,10 @@ from sklearn.feature_extraction.text import CountVectorizer
8
  from sklearn.ensemble import RandomForestClassifier
9
  from sklearn.pipeline import Pipeline
10
  import joblib
 
 
 
 
11
 
12
  # Initialize the HuggingFace API Client with a valid model
13
  # Replace 'gpt-3.5-turbo' with your desired model if different
@@ -127,7 +131,9 @@ with gr.Blocks() as demo:
127
  gr.Markdown("# 🧠 Advanced AI Chatbot with Knowledge Base and Model Training")
128
 
129
  with gr.Tab("💬 Chat"):
130
- chatbot = gr.Chatbot(label="AI Chatbot").style(height=600)
 
 
131
  with gr.Row():
132
  with gr.Column(scale=0.85):
133
  user_input = gr.Textbox(
 
8
  from sklearn.ensemble import RandomForestClassifier
9
  from sklearn.pipeline import Pipeline
10
  import joblib
11
+ import warnings
12
+
13
+ # Suppress specific warnings if necessary
14
+ warnings.filterwarnings("ignore", category=UserWarning, module="gradio.components.chatbot")
15
 
16
  # Initialize the HuggingFace API Client with a valid model
17
  # Replace 'gpt-3.5-turbo' with your desired model if different
 
131
  gr.Markdown("# 🧠 Advanced AI Chatbot with Knowledge Base and Model Training")
132
 
133
  with gr.Tab("💬 Chat"):
134
+ chatbot = gr.Chatbot(label="AI Chatbot", type="messages") # Specify type='messages'
135
+ # Removed .style(height=600) as it's deprecated
136
+
137
  with gr.Row():
138
  with gr.Column(scale=0.85):
139
  user_input = gr.Textbox(