ashok2216 commited on
Commit
bacf95c
·
verified ·
1 Parent(s): 7f788ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -35,6 +35,13 @@ import streamlit as st
35
  from data import flight_data
36
 
37
 
 
 
 
 
 
 
 
38
  API_URL = "https://api-inference.huggingface.co/models/google/tapas-base-finetuned-wtq"
39
  headers = {"Authorization": f"Bearer {HF_TOKEN}"}
40
 
 
35
  from data import flight_data
36
 
37
 
38
+
39
+ hf_token = os.getenv("HF_TOKEN")
40
+ if hf_token is None:
41
+ raise ValueError("Hugging Face token not found. Please set the HF_TOKEN environment variable.")
42
+ login(hf_token)
43
+
44
+
45
  API_URL = "https://api-inference.huggingface.co/models/google/tapas-base-finetuned-wtq"
46
  headers = {"Authorization": f"Bearer {HF_TOKEN}"}
47