Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,11 @@ import torch
|
|
5 |
from transformers import pipeline
|
6 |
from huggingface_hub import login
|
7 |
|
|
|
|
|
|
|
|
|
|
|
8 |
# Set OpenAI and Hugging Face API keys
|
9 |
openai.api_key = "sk-1E6ExsyFb-cdU8jPNDP1dsEq_ra_bazU-EXQZQ86pJT3BlbkFJ4zURsV0t--3qNM7A-P57NUqZIBosrL7POwzpjR5EQA"
|
10 |
|
|
|
5 |
from transformers import pipeline
|
6 |
from huggingface_hub import login
|
7 |
|
8 |
+
import os
|
9 |
+
|
10 |
+
hf_api_key = os.getenv("HF_API_KEY")
|
11 |
+
login(token=hf_api_key)
|
12 |
+
|
13 |
# Set OpenAI and Hugging Face API keys
|
14 |
openai.api_key = "sk-1E6ExsyFb-cdU8jPNDP1dsEq_ra_bazU-EXQZQ86pJT3BlbkFJ4zURsV0t--3qNM7A-P57NUqZIBosrL7POwzpjR5EQA"
|
15 |
|