Fariddvp commited on
Commit
625e1b2
1 Parent(s): cd9c591

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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