uhygfd commited on
Commit
ffe5894
·
verified ·
1 Parent(s): 1c594c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -23,7 +23,7 @@ API_TOKEN = random.choice(hugging_tokens)
23
  with open("./dialogues.txt", "r", encoding="utf-8") as file:
24
  error_phrases = [line.strip() for line in file]
25
 
26
- client = InferenceClient("Qwen/Qwen1.5-72B-Chat", token=API_TOKEN)
27
 
28
  def format_prompt(message, history):
29
  # Предварительный текст, который будет добавлен перед каждым запросом
@@ -93,7 +93,8 @@ def generate(
93
  output += response.token.text
94
  yield output
95
  return output
96
- except Exception:
 
97
  error_message = random.choice(error_phrases)
98
  yield error_message
99
 
 
23
  with open("./dialogues.txt", "r", encoding="utf-8") as file:
24
  error_phrases = [line.strip() for line in file]
25
 
26
+ client = InferenceClient("Qwen/Qwen1.5-4B-Chat", token=API_TOKEN)
27
 
28
  def format_prompt(message, history):
29
  # Предварительный текст, который будет добавлен перед каждым запросом
 
93
  output += response.token.text
94
  yield output
95
  return output
96
+ except Exception as e:
97
+ print(e)
98
  error_message = random.choice(error_phrases)
99
  yield error_message
100