alex-mindspace commited on
Commit
5e5664c
·
1 Parent(s): 21638be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -33
app.py CHANGED
@@ -27,7 +27,7 @@ def predict(system_msg, inputs, top_p, temperature, chat_counter, chatbot=[], hi
27
 
28
  if chat_counter == 0 :
29
  payload = {
30
- "model": "gpt-4",
31
  "messages": initial_message ,
32
  "temperature" : 1.0,
33
  "top_p":1.0,
@@ -54,7 +54,7 @@ def predict(system_msg, inputs, top_p, temperature, chat_counter, chatbot=[], hi
54
  messages.append(temp)
55
  #messages
56
  payload = {
57
- "model": "gpt-4",
58
  "messages": messages, # Of the type of [{"role": "user", "content": f"{inputs}"}],
59
  "temperature" : temperature, #1.0,
60
  "top_p": top_p, #1.0,
@@ -158,36 +158,5 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
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-savvy 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=99, concurrency_count=20).launch(debug=True)
 
27
 
28
  if chat_counter == 0 :
29
  payload = {
30
+ "model": "gpt-3.5-turbo",
31
  "messages": initial_message ,
32
  "temperature" : 1.0,
33
  "top_p":1.0,
 
54
  messages.append(temp)
55
  #messages
56
  payload = {
57
+ "model": "gpt-3.5-turbo",
58
  "messages": messages, # Of the type of [{"role": "user", "content": f"{inputs}"}],
59
  "temperature" : temperature, #1.0,
60
  "top_p": top_p, #1.0,
 
158
 
159
  b1.click(reset_textbox, [], [inputs])
160
  inputs.submit(reset_textbox, [], [inputs])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
 
162
  demo.queue(max_size=99, concurrency_count=20).launch(debug=True)