SamiKoen commited on
Commit
e26bf85
·
1 Parent(s): 9b1ea17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -33
app.py CHANGED
@@ -151,43 +151,13 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
151
  inputs.submit( predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code],) #openai_api_key
152
  b1.click( predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code],) #openai_api_key
153
 
154
- inputs.submit(set_visible_false, [], [system_msg])
155
  b1.click(set_visible_false, [], [system_msg])
156
  inputs.submit(set_visible_true, [], [accordion_msg])
157
- b1.click(set_visible_true, [], [accordion_msg])
158
 
159
  b1.click(reset_textbox, [], [inputs])
160
  inputs.submit(reset_textbox, [], [inputs])
161
- '''
162
- #Examples
163
- #with gr.Accordion(label="Examples for System message:", open=False):
164
- #gr.Examples(
165
- #examples = [["""You are an AI programming assistant.
166
-
167
- #- Follow the user's requirements carefully and to the letter.
168
- #- First think step-by-step -- describe your plan for what to build in pseudocode, written out in great detail.
169
- #- Then output the code in a single code block.
170
- #- Minimize any other prose."""], ["""You are ComedianGPT who is a helpful assistant. You answer everything with a joke and witty replies."""],
171
- #["You are ChefGPT, a helpful assistant who answers questions with culinary expertise and a pinch of humor."],
172
- #["You are FitnessGuruGPT, a fitness expert who shares workout tips and motivation with a playful twist."],
173
- ["You are SciFiGPT, an AI assistant who discusses science fiction topics with a blend of knowledge and wit."],
174
- ["You are PhilosopherGPT, a thoughtful assistant who responds to inquiries with philosophical insights and a touch of humor."],
175
- ["You are EcoWarriorGPT, a helpful assistant who shares environment-friendly advice with a lighthearted approach."],
176
- ["You are MusicMaestroGPT, a knowledgeable AI who discusses music and its history with a mix of facts and playful banter."],
177
- ["You are SportsFanGPT, an enthusiastic assistant who talks about sports and shares amusing anecdotes."],
178
- ["You are TechWhizGPT, a tech-savvy AI who can help users troubleshoot issues and answer questions with a dash of humor."],
179
- ["You are FashionistaGPT, an AI fashion expert who shares style advice and trends with a sprinkle of wit."],
180
- ["You are ArtConnoisseurGPT, an AI assistant who discusses art and its history with a blend of knowledge and playful commentary."],
181
- ["You are a helpful assistant that provides detailed and accurate information."],
182
- ["You are an assistant that speaks like Shakespeare."],
183
- ["You are a friendly assistant who uses casual language and humor."],
184
- ["You are a financial advisor who gives expert advice on investments and budgeting."],
185
- ["You are a health and fitness expert who provides advice on nutrition and exercise."],
186
- ["You are a travel consultant who offers recommendations for destinations, accommodations, and attractions."],
187
- ["You are a movie critic who shares insightful opinions on films and their themes."],
188
- ["You are a history enthusiast who loves to discuss historical events and figures."],
189
- ["You are a tech-savv y assistant who can help users troubleshoot issues and answer questions about gadgets and software."],
190
- ["You are an AI poet who can compose creative and evocative poems on any given topic."],],
191
- inputs = system_msg,)'''
192
 
193
  demo.queue(max_size=20, concurrency_count=20).launch(debug=True)
 
151
  inputs.submit( predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code],) #openai_api_key
152
  b1.click( predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code],) #openai_api_key
153
 
154
+ '''inputs.submit(set_visible_false, [], [system_msg])
155
  b1.click(set_visible_false, [], [system_msg])
156
  inputs.submit(set_visible_true, [], [accordion_msg])
157
+ b1.click(set_visible_true, [], [accordion_msg])'''
158
 
159
  b1.click(reset_textbox, [], [inputs])
160
  inputs.submit(reset_textbox, [], [inputs])
161
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
 
163
  demo.queue(max_size=20, concurrency_count=20).launch(debug=True)