sounar commited on
Commit
800d614
·
verified ·
1 Parent(s): 181e22c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -4,7 +4,10 @@ import torch
4
  import os
5
 
6
  # Retrieve the token from environment variables
7
- api_token = os.getenv("HF_TOKEN").strip()
 
 
 
8
 
9
  # Model name
10
  model_name = "ContactDoctor/Bio-Medical-MultiModal-Llama-3-8B-V1"
@@ -62,4 +65,4 @@ iface = gr.Interface(
62
 
63
  # Launch the Gradio app
64
  if __name__ == "__main__":
65
- iface.launch()
 
4
  import os
5
 
6
  # Retrieve the token from environment variables
7
+ api_token = os.getenv("HF_TOKEN")
8
+ if not api_token:
9
+ raise ValueError("HF_TOKEN environment variable is not set. Please set it to your Hugging Face API token.")
10
+ api_token = api_token.strip()
11
 
12
  # Model name
13
  model_name = "ContactDoctor/Bio-Medical-MultiModal-Llama-3-8B-V1"
 
65
 
66
  # Launch the Gradio app
67
  if __name__ == "__main__":
68
+ iface.launch(debug=True)