Better detect when no model is loaded
This commit is contained in:
parent
c8ad960018
commit
27f3a78834
2 changed files with 3 additions and 3 deletions
|
@ -125,7 +125,7 @@ def stop_everything_event():
|
|||
|
||||
def generate_reply(question, state, eos_token=None, stopping_strings=[]):
|
||||
|
||||
if shared.model_name == 'None':
|
||||
if shared.model_name == 'None' or shared.model is None:
|
||||
print("No model is loaded! Select one in the Model tab.")
|
||||
yield formatted_outputs(question, shared.model_name)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue