Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,10 @@ from huggingface_hub import login
|
|
| 9 |
|
| 10 |
# Get the Hugging Face API token from the environment variable
|
| 11 |
hf_token = os.getenv("pasavectoi")
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# Load the dataset from the local file
|
| 15 |
data = pd.read_csv('twitter_dataset.csv').head(1000)
|
|
|
|
| 9 |
|
| 10 |
# Get the Hugging Face API token from the environment variable
|
| 11 |
hf_token = os.getenv("pasavectoi")
|
| 12 |
+
|
| 13 |
+
# Login to Hugging Face Hub using the token without interactive prompt
|
| 14 |
+
api = HfApi()
|
| 15 |
+
api.set_access_token(hf_token)
|
| 16 |
|
| 17 |
# Load the dataset from the local file
|
| 18 |
data = pd.read_csv('twitter_dataset.csv').head(1000)
|