Spaces:
Running
Running
Update app.py (#1)
Browse files- Update app.py (625e1b25104e17bee12ec72ec3a30cd7eeb9a3b1)
Co-authored-by: Divanpour <Fariddvp@users.noreply.huggingface.co>
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 |
|