bezaime commited on
Commit
6b1d463
·
verified ·
1 Parent(s): e93d941

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -69,6 +69,15 @@ rag_chain = (
69
 
70
  import gradio as gr
71
 
 
 
 
 
 
 
 
 
 
72
  # Function for the chatbot response stream
73
  def rag_memory_stream(message, history):
74
  partial_text = ""
@@ -110,7 +119,7 @@ with gr.Blocks(theme=custom_theme) as demo:
110
  fn=rag_memory_stream,
111
  type="messages",
112
  examples=examples,
113
- fill_height=True,
114
  )
115
 
116
  # Car Preferences Tab
 
69
 
70
  import gradio as gr
71
 
72
+ # Mock for `rag_chain.stream` since it’s undefined in the snippet
73
+ class MockRAGChain:
74
+ @staticmethod
75
+ def stream(message):
76
+ for word in message.split():
77
+ yield word + " "
78
+
79
+ rag_chain = MockRAGChain() # Replace this with the actual implementation
80
+
81
  # Function for the chatbot response stream
82
  def rag_memory_stream(message, history):
83
  partial_text = ""
 
119
  fn=rag_memory_stream,
120
  type="messages",
121
  examples=examples,
122
+ height=400, # Ensure a default height for the chat interface
123
  )
124
 
125
  # Car Preferences Tab