Paridhim commited on
Commit
35c007b
1 Parent(s): 8a681fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -2,9 +2,12 @@ import gradio as gr
2
  from transformers import AutoTokenizer, AutoModelForCausalLM
3
  import torch
4
 
 
5
 
 
6
  model = AutoModelForCausalLM.from_pretrained(
7
  "mistralai/Mistral-7B-Instruct-v0.1",
 
8
  torch_dtype=torch.bfloat16,
9
  trust_remote_code=True,
10
  device_map="auto",
 
2
  from transformers import AutoTokenizer, AutoModelForCausalLM
3
  import torch
4
 
5
+ import os
6
 
7
+ hf_token = os.environ.get('HF_TOKEN', None)
8
  model = AutoModelForCausalLM.from_pretrained(
9
  "mistralai/Mistral-7B-Instruct-v0.1",
10
+ token = hf_token,
11
  torch_dtype=torch.bfloat16,
12
  trust_remote_code=True,
13
  device_map="auto",