OlivierDehaene commited on
Commit
2ca7bf0
1 Parent(s): 94809e9

add openchat

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -7,13 +7,17 @@ from text_generation import Client, InferenceAPIClient
7
 
8
  def get_client(model: str):
9
  if model == "Rallio67/joi2_20B_instruct_alpha":
10
- return Client(os.getenv("API_URL"))
 
 
11
  return InferenceAPIClient(model, token=os.getenv("HF_TOKEN", None))
12
 
13
 
14
  def get_usernames(model: str):
15
  if model == "Rallio67/joi2_20B_instruct_alpha":
16
  return "User: ", "Joi: "
 
 
17
  return "User: ", "Assistant: "
18
 
19
 
@@ -109,6 +113,7 @@ with gr.Blocks(
109
  model = gr.Radio(
110
  value="Rallio67/joi2_20B_instruct_alpha",
111
  choices=[
 
112
  "Rallio67/joi2_20B_instruct_alpha",
113
  "google/flan-t5-xxl",
114
  "google/flan-ul2",
 
7
 
8
  def get_client(model: str):
9
  if model == "Rallio67/joi2_20B_instruct_alpha":
10
+ return Client(os.getenv("JOI_API_URL"))
11
+ if model == "togethercomputer/GPT-NeoXT-Chat-Base-20B":
12
+ return Client(os.getenv("OPENCHAT_API_URL"))
13
  return InferenceAPIClient(model, token=os.getenv("HF_TOKEN", None))
14
 
15
 
16
  def get_usernames(model: str):
17
  if model == "Rallio67/joi2_20B_instruct_alpha":
18
  return "User: ", "Joi: "
19
+ if model == "togethercomputer/GPT-NeoXT-Chat-Base-20B":
20
+ return "<user>: ", "<bot>: "
21
  return "User: ", "Assistant: "
22
 
23
 
 
113
  model = gr.Radio(
114
  value="Rallio67/joi2_20B_instruct_alpha",
115
  choices=[
116
+ "togethercomputer/GPT-NeoXT-Chat-Base-20B",
117
  "Rallio67/joi2_20B_instruct_alpha",
118
  "google/flan-t5-xxl",
119
  "google/flan-ul2",