Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,9 +8,14 @@ models=[
|
|
| 8 |
"google/gemma-7b",
|
| 9 |
"google/gemma-7b-it",
|
| 10 |
"google/gemma-2b",
|
| 11 |
-
"google/gemma-2b-it"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
]
|
| 13 |
-
client_z=[]
|
| 14 |
|
| 15 |
VERBOSE=False
|
| 16 |
|
|
@@ -37,8 +42,9 @@ def format_prompt(message, history, cust_p):
|
|
| 37 |
|
| 38 |
def chat_inf(system_prompt,prompt,history,memory,client_choice,seed,temp,tokens,top_p,rep_p,chat_mem,cust_p):
|
| 39 |
#token max=8192
|
|
|
|
| 40 |
hist_len=0
|
| 41 |
-
client=
|
| 42 |
if not history:
|
| 43 |
history = []
|
| 44 |
hist_len=0
|
|
|
|
| 8 |
"google/gemma-7b",
|
| 9 |
"google/gemma-7b-it",
|
| 10 |
"google/gemma-2b",
|
| 11 |
+
"google/gemma-2b-it"
|
| 12 |
+
]
|
| 13 |
+
clients=[
|
| 14 |
+
InferenceClient(models[0]),
|
| 15 |
+
InferenceClient(models[1]),
|
| 16 |
+
InferenceClient(models[2]),
|
| 17 |
+
InferenceClient(models[3]),
|
| 18 |
]
|
|
|
|
| 19 |
|
| 20 |
VERBOSE=False
|
| 21 |
|
|
|
|
| 42 |
|
| 43 |
def chat_inf(system_prompt,prompt,history,memory,client_choice,seed,temp,tokens,top_p,rep_p,chat_mem,cust_p):
|
| 44 |
#token max=8192
|
| 45 |
+
print(client_choice)
|
| 46 |
hist_len=0
|
| 47 |
+
client=clients[int(client_choice)-1]
|
| 48 |
if not history:
|
| 49 |
history = []
|
| 50 |
hist_len=0
|