iseesaw commited on
Commit
942e91e
1 Parent(s): 0011614

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,6 +4,8 @@ import gradio as gr
4
 
5
  api_key = os.environ.get("OPENAI_API_KEY")
6
  base_url = os.environ.get("OPENAI_API_BASE")
 
 
7
  client = OpenAI(api_key=api_key, base_url=base_url)
8
 
9
  def predict(message, history):
@@ -13,7 +15,7 @@ def predict(message, history):
13
  history_openai_format.append({"role": "assistant", "content":assistant})
14
  history_openai_format.append({"role": "user", "content": message})
15
 
16
- response = client.chat.completions.create(model='Llama-3-8B-UltraMedical',
17
  messages= history_openai_format,
18
  temperature=1.0,
19
  stop=["<|eot_id|>"],
 
4
 
5
  api_key = os.environ.get("OPENAI_API_KEY")
6
  base_url = os.environ.get("OPENAI_API_BASE")
7
+ model_name = os.environ.get("MODEL_NAME")
8
+
9
  client = OpenAI(api_key=api_key, base_url=base_url)
10
 
11
  def predict(message, history):
 
15
  history_openai_format.append({"role": "assistant", "content":assistant})
16
  history_openai_format.append({"role": "user", "content": message})
17
 
18
+ response = client.chat.completions.create(model=model_name,
19
  messages= history_openai_format,
20
  temperature=1.0,
21
  stop=["<|eot_id|>"],