lahiruchamika27 commited on
Commit
99838a4
·
verified ·
1 Parent(s): 19db783

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -5,12 +5,18 @@ from datetime import datetime
5
  import torch
6
  from transformers import PegasusForConditionalGeneration, PegasusTokenizer
7
  import time
 
 
 
 
8
 
9
  app = FastAPI()
10
 
 
 
11
  # Configuration
12
  API_KEYS = {
13
- "bdLFqk4IcYmRE2ONZeCts4DWrqkpqQxW": "user1" # In production, use a secure database
14
  }
15
 
16
  # Initialize model and tokenizer with smaller model for Spaces
 
5
  import torch
6
  from transformers import PegasusForConditionalGeneration, PegasusTokenizer
7
  import time
8
+ #from dotenv import load_dotenv
9
+ import os
10
+
11
+ #load_dotenv()
12
 
13
  app = FastAPI()
14
 
15
+ API_KEY = os.getenv("API_KEY")
16
+
17
  # Configuration
18
  API_KEYS = {
19
+ API_KEY : "user1" # In production, use a secure database
20
  }
21
 
22
  # Initialize model and tokenizer with smaller model for Spaces