Ayeshanoor101 commited on
Commit
21c49f2
1 Parent(s): 7df1821

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -33
app.py CHANGED
@@ -80,40 +80,40 @@ def respond(
80
  chatbot=gr.Chatbot(height=450, placeholder=PLACEHOLDER, label='Gradio ChatInterface')
81
 
82
  # Define the interface layout
83
- with gr.Div(fill_height=True, css=css) as demo:
84
- # Add description markdown
85
- gr.Markdown(DESCRIPTION)
86
- # Add duplicate button
87
- gr.DuplicateButton(value="Duplicate Space for private use", elem_id="duplicate-button")
88
- # Add chat interface
89
- gr.ChatInterface(
90
- fn=respond,
91
- chatbot=chatbot,
92
- fill_height=True,
93
- additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
94
- additional_inputs=[
95
- gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
96
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
97
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
98
- gr.Slider(
99
- minimum=0.1,
100
- maximum=1.0,
101
- value=0.95,
102
- step=0.05,
103
- label="Top-p (nucleus sampling)",
104
- ),
105
- ],
106
- examples=[
107
- ['How to setup a human base on Mars? Give short answer.'],
108
- ['Explain theory of relativity to me like I’m 8 years old.'],
109
- ['What is 9,000 * 9,000?'],
110
- ['Write a pun-filled happy birthday message to my friend Alex.'],
111
- ['Justify why a penguin might make a good king of the jungle.']
112
- ],
113
- cache_examples=False,
114
- )
115
  # Add license markdown
116
- gr.Markdown(LICENSE)
117
 
118
  # Launch the interface
119
  if __name__ == "__main__":
 
80
  chatbot=gr.Chatbot(height=450, placeholder=PLACEHOLDER, label='Gradio ChatInterface')
81
 
82
  # Define the interface layout
83
+ with gr.Div(fill_height=True, css=css) as demo:
84
+ # Add description markdown
85
+ gr.Markdown(DESCRIPTION)
86
+ # Add duplicate button
87
+ gr.DuplicateButton(value="Duplicate Space for private use", elem_id="duplicate-button")
88
+ # Add chat interface
89
+ gr.ChatInterface(
90
+ fn=respond,
91
+ chatbot=chatbot,
92
+ fill_height=True,
93
+ additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
94
+ additional_inputs=[
95
+ gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
96
+ gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
97
+ gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
98
+ gr.Slider(
99
+ minimum=0.1,
100
+ maximum=1.0,
101
+ value=0.95,
102
+ step=0.05,
103
+ label="Top-p (nucleus sampling)",
104
+ ),
105
+ ],
106
+ examples=[
107
+ ['How to setup a human base on Mars? Give short answer.'],
108
+ ['Explain theory of relativity to me like I’m 8 years old.'],
109
+ ['What is 9,000 * 9,000?'],
110
+ ['Write a pun-filled happy birthday message to my friend Alex.'],
111
+ ['Justify why a penguin might make a good king of the jungle.']
112
+ ],
113
+ cache_examples=False,
114
+ )
115
  # Add license markdown
116
+ gr.Markdown(LICENSE)
117
 
118
  # Launch the interface
119
  if __name__ == "__main__":