NeonBohdan commited on
Commit
fb1af15
1 Parent(s): 415adac

Added dropdown

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -14,14 +14,11 @@ model_choices = [
14
  key = os.environ['OPENAI_API_KEY']
15
  config = {
16
  "key": key,
17
- "model": model_choices[0],
18
  "role": "You are trying to give a short answer in less than 40 words.",
19
  "context_depth": 3,
20
  "max_tokens": 256,
21
  }
22
-
23
-
24
-
25
  chatgpt = ChatGPT(config)
26
 
27
 
@@ -36,7 +33,7 @@ def ask(message, history, persona):
36
  demo = gr.ChatInterface(ask,
37
  additional_inputs=[
38
  gr.Textbox(chatgpt.role, label="Persona"),
39
- #gr.Dropdown(choices=model_choices, value=model_choices[0], label="Model")
40
  ]
41
  )
42
 
 
14
  key = os.environ['OPENAI_API_KEY']
15
  config = {
16
  "key": key,
17
+ "model": "gpt-3.5-turbo",
18
  "role": "You are trying to give a short answer in less than 40 words.",
19
  "context_depth": 3,
20
  "max_tokens": 256,
21
  }
 
 
 
22
  chatgpt = ChatGPT(config)
23
 
24
 
 
33
  demo = gr.ChatInterface(ask,
34
  additional_inputs=[
35
  gr.Textbox(chatgpt.role, label="Persona"),
36
+ gr.Dropdown(choices=model_choices, value=model_choices[0], label="Model")
37
  ]
38
  )
39