Spaces:
Paused
Paused
Update app/main.py
Browse files- app/main.py +1 -6
app/main.py
CHANGED
|
@@ -5,11 +5,6 @@ from pydantic import BaseModel
|
|
| 5 |
from gradio_client import Client
|
| 6 |
import time
|
| 7 |
import json
|
| 8 |
-
import os # Import os module
|
| 9 |
-
from dotenv import load_dotenv # Import to load .env file
|
| 10 |
-
|
| 11 |
-
# Load environment variables from .env
|
| 12 |
-
load_dotenv()
|
| 13 |
|
| 14 |
# Configure your Gradio Space ID and default endpoint
|
| 15 |
SPACE_ID = "prithivMLmods/SAMBANOVA"
|
|
@@ -19,7 +14,7 @@ client = Client(SPACE_ID)
|
|
| 19 |
|
| 20 |
# Security setup
|
| 21 |
security = HTTPBearer()
|
| 22 |
-
VALID_API_KEY =
|
| 23 |
|
| 24 |
async def get_api_key(credentials: HTTPAuthorizationCredentials = Depends(security)):
|
| 25 |
if credentials.scheme != "Bearer":
|
|
|
|
| 5 |
from gradio_client import Client
|
| 6 |
import time
|
| 7 |
import json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Configure your Gradio Space ID and default endpoint
|
| 10 |
SPACE_ID = "prithivMLmods/SAMBANOVA"
|
|
|
|
| 14 |
|
| 15 |
# Security setup
|
| 16 |
security = HTTPBearer()
|
| 17 |
+
VALID_API_KEY = "sk-1234" # Replace with your actual API key
|
| 18 |
|
| 19 |
async def get_api_key(credentials: HTTPAuthorizationCredentials = Depends(security)):
|
| 20 |
if credentials.scheme != "Bearer":
|