danhtran2mind commited on
Commit
7ec20fb
·
verified ·
1 Parent(s): 6a8b461

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -65,13 +65,13 @@ def gradio_generate_text(prompt, max_length=100, num_return_sequences=1, top_p=0
65
  # Ensure the models directory exists
66
  if not os.path.exists('models'):
67
  os.makedirs('models')
68
- if not os.path.exists('models/vi-medical-t5-finetune-qa'):
69
  # Run the Git LFS commands to clone the model
70
  run_shell_command('git lfs install')
71
- run_shell_command('cd models && git clone https://huggingface.co/danhtran2mind/vi-medical-t5-finetune-qa && cd ..')
72
 
73
  # Load the trained model and tokenizer
74
- model_path = "models/vi-medical-t5-finetune-qa"
75
  tokenizer, model, device = load_model_and_tokenizer(model_path)
76
  # Create Gradio interface
77
 
 
65
  # Ensure the models directory exists
66
  if not os.path.exists('models'):
67
  os.makedirs('models')
68
+ if not os.path.exists('models/vi-medical-mt5-finetune-qa'):
69
  # Run the Git LFS commands to clone the model
70
  run_shell_command('git lfs install')
71
+ run_shell_command('cd models && git clone https://huggingface.co/danhtran2mind/vi-medical-mt5-finetune-qa && cd ..')
72
 
73
  # Load the trained model and tokenizer
74
+ model_path = "models/vi-medical-mt5-finetune-qa"
75
  tokenizer, model, device = load_model_and_tokenizer(model_path)
76
  # Create Gradio interface
77