Reality123b commited on
Commit
ecf766b
·
verified ·
1 Parent(s): cea5ef5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -11,7 +11,7 @@ class XylariaChat:
11
 
12
  # Initialize the inference client
13
  self.client = InferenceClient(
14
- model="Qwen/QwQ-32B-Preview", # Changed model name
15
  token=self.hf_token
16
  )
17
 
@@ -138,7 +138,7 @@ Capabilities:
138
 
139
  # Streaming output
140
  for response_text in response_stream:
141
- full_response += response_text
142
 
143
  # Update the last message in chat history with partial response
144
  updated_history[-1][1] = full_response
@@ -161,15 +161,12 @@ Capabilities:
161
  # Custom CSS for Inter font
162
  custom_css = """
163
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
164
-
165
  body, .gradio-container {
166
  font-family: 'Inter', sans-serif !important;
167
  }
168
-
169
  .chatbot-container .message {
170
  font-family: 'Inter', sans-serif !important;
171
  }
172
-
173
  .gradio-container input,
174
  .gradio-container textarea,
175
  .gradio-container button {
 
11
 
12
  # Initialize the inference client
13
  self.client = InferenceClient(
14
+ model="Qwen/Qwen-32B-Preview", # Changed model name
15
  token=self.hf_token
16
  )
17
 
 
138
 
139
  # Streaming output
140
  for response_text in response_stream:
141
+ full_response += response_text + "<|im_end|>" # Add <|im_end|> here
142
 
143
  # Update the last message in chat history with partial response
144
  updated_history[-1][1] = full_response
 
161
  # Custom CSS for Inter font
162
  custom_css = """
163
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
 
164
  body, .gradio-container {
165
  font-family: 'Inter', sans-serif !important;
166
  }
 
167
  .chatbot-container .message {
168
  font-family: 'Inter', sans-serif !important;
169
  }
 
170
  .gradio-container input,
171
  .gradio-container textarea,
172
  .gradio-container button {