Spaces:
PhilSpiel
/
Running

PhilSpiel commited on
Commit
5ac937b
1 Parent(s): 4acd692

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -17,6 +17,7 @@ theme=os.getenv("THEME")
17
  client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
18
  # OpenAI model
19
  openai_model = os.getenv("OPENAI_MODEL")
 
20
  ################# End OpenAI-SPECIFIC VALUES ######################
21
 
22
  tx = os.getenv("TX")
@@ -25,7 +26,7 @@ file_name = os.getenv("FILE_NAME")
25
 
26
  ############### CHAT ###################
27
  def predict(user_input, history):
28
- max_length = 2000
29
  transcript_file_path = f"{prefix}{coach_code}-{file_name}"
30
  transcript = "" # Initialize the transcript variable
31
 
@@ -53,7 +54,7 @@ def predict(user_input, history):
53
  completion = client.chat.completions.create(
54
  model=openai_model,
55
  messages=history_openai_format,
56
- temperature=1.2,
57
  frequency_penalty=0.4,
58
  presence_penalty=0.1,
59
  stream=True
 
17
  client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
18
  # OpenAI model
19
  openai_model = os.getenv("OPENAI_MODEL")
20
+ temp = os.getenv("TEMPERATURE")
21
  ################# End OpenAI-SPECIFIC VALUES ######################
22
 
23
  tx = os.getenv("TX")
 
26
 
27
  ############### CHAT ###################
28
  def predict(user_input, history):
29
+ max_length = 3000
30
  transcript_file_path = f"{prefix}{coach_code}-{file_name}"
31
  transcript = "" # Initialize the transcript variable
32
 
 
54
  completion = client.chat.completions.create(
55
  model=openai_model,
56
  messages=history_openai_format,
57
+ temperature=temp,
58
  frequency_penalty=0.4,
59
  presence_penalty=0.1,
60
  stream=True