Dhahlan2000 commited on
Commit
13a640a
·
verified ·
1 Parent(s): 09ecec6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -15
app.py CHANGED
@@ -159,21 +159,19 @@ def respond(
159
 
160
  yield response
161
 
162
- demo = gr.ChatInterface(
163
- respond,
164
- additional_inputs=[
165
- gr.Textbox(value="You are an advanced Singlish Chatbot. Your name is Chitti. You are always friendly.", label="System message"),
166
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
167
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
168
- gr.Slider(
169
- minimum=0.1,
170
- maximum=1.0,
171
- value=0.95,
172
- step=0.05,
173
- label="Top-p (nucleus sampling)",
174
- ),
175
- ],
176
- )
177
 
178
  if __name__ == "__main__":
179
  demo.launch(share=True)
 
159
 
160
  yield response
161
 
162
+ with gr.Blocks() as demo:
163
+ gr.Markdown("## 🤖 Welcome to Chitti - The Advanced Singlish Chatbot")
164
+ gr.Markdown("_Note: Since its a testing environment, it will take around 3 - 8 mins to response._")
165
+
166
+ gr.ChatInterface(
167
+ respond,
168
+ additional_inputs=[
169
+ gr.Textbox(value="You are an advanced Singlish Chatbot. Your name is Chitti. You are always friendly.", label="System message"),
170
+ gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
171
+ gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
172
+ gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
173
+ ],
174
+ )
 
 
175
 
176
  if __name__ == "__main__":
177
  demo.launch(share=True)