andreska commited on
Commit
ffb2177
·
1 Parent(s): 9714f09

CODEFIX: Switched model and added more debug info to figure out why it doesn't work for embedded versions.

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -81,8 +81,9 @@ def handle_submit():
81
 
82
  # List of models to try in order
83
  models = [
 
84
  "Qwen/Qwen2.5-72B-Instruct", #Will not use by default, as using a secondary model spends two requests. Will rather update the code if needed.
85
- "Qwen/Qwen2.5-Coder-32B-Instruct", # Primary model
86
  ]
87
 
88
  for model in models:
@@ -106,7 +107,8 @@ def handle_submit():
106
  except Exception as e:
107
  if "422" in str(e): # Service Unavailable error
108
  if model == models[-1]: # If this was the last model to try
109
- error_message = "All models are currently unavailable. Please try again later."
 
110
  placeholder.markdown(f'<div class="scrollable-div"><p>{error_message}</p></div>', unsafe_allow_html=True)
111
  continue # Try the next model
112
  else:
 
81
 
82
  # List of models to try in order
83
  models = [
84
+ #"mistralai/Mistral-7B-Instruct-v0.2", #not enough tokens. 32k while 35k is passed. But else works.
85
  "Qwen/Qwen2.5-72B-Instruct", #Will not use by default, as using a secondary model spends two requests. Will rather update the code if needed.
86
+ #"Qwen/Qwen2.5-Coder-32B-Instruct", # Primary model
87
  ]
88
 
89
  for model in models:
 
107
  except Exception as e:
108
  if "422" in str(e): # Service Unavailable error
109
  if model == models[-1]: # If this was the last model to try
110
+ error_message = f"422 An error occurred: {str(e)}"
111
+ #error_message = "All models are currently unavailable. Please try again later."
112
  placeholder.markdown(f'<div class="scrollable-div"><p>{error_message}</p></div>', unsafe_allow_html=True)
113
  continue # Try the next model
114
  else: