Sebastian Tinoco commited on
Commit
43f381b
1 Parent(s): a394acb

fixed token init

Browse files
Files changed (1) hide show
  1. app.py +0 -11
app.py CHANGED
@@ -1,9 +1,6 @@
1
  from transformers import pipeline
2
  import torch
3
  import gradio as gr
4
- import os
5
- from dotenv import load_dotenv
6
- from huggingface_hub import login
7
  from utils import parse_args
8
 
9
 
@@ -12,14 +9,6 @@ args = parse_args()
12
  model = args['model']
13
  model_name = "clinical-assistance/" + model
14
 
15
- # Load secrets
16
- load_dotenv()
17
- token = os.getenv("TOKEN")
18
- assert token is not None, 'Hugging Face token has not been specified. Please specify your token in a .env file.'
19
-
20
- # Login to Hugging Face
21
- login(token=token)
22
-
23
  # Init model
24
  device = 'cuda:0' if torch.cuda.is_available() else 'cpu'
25
  generate_kwargs = {"language":"<|es|>", "task": "transcribe"}
 
1
  from transformers import pipeline
2
  import torch
3
  import gradio as gr
 
 
 
4
  from utils import parse_args
5
 
6
 
 
9
  model = args['model']
10
  model_name = "clinical-assistance/" + model
11
 
 
 
 
 
 
 
 
 
12
  # Init model
13
  device = 'cuda:0' if torch.cuda.is_available() else 'cpu'
14
  generate_kwargs = {"language":"<|es|>", "task": "transcribe"}