Add a warning for when no model is loaded
This commit is contained in:
parent
ddbd237ec9
commit
04866dc4fc
2 changed files with 16 additions and 0 deletions
|
@ -124,6 +124,12 @@ def stop_everything_event():
|
|||
|
||||
|
||||
def generate_reply(question, state, eos_token=None, stopping_strings=[]):
|
||||
|
||||
if shared.model_name == 'None':
|
||||
print("No model is loaded! Select one in the Model tab.")
|
||||
yield formatted_outputs(question, shared.model_name)
|
||||
return
|
||||
|
||||
clear_torch_cache()
|
||||
seed = set_manual_seed(state['seed'])
|
||||
shared.stop_everything = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue