Spaces:
Runtime error
Runtime error
Commit
·
b432a1e
1
Parent(s):
f44d44d
testing secrets
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
from fastapi import FastAPI
|
2 |
-
|
3 |
app = FastAPI()
|
4 |
|
5 |
@app.get("/")
|
|
|
1 |
from fastapi import FastAPI
|
2 |
+
from config import settings
|
3 |
app = FastAPI()
|
4 |
|
5 |
@app.get("/")
|
config.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from pydantic import BaseSettings
|
2 |
+
import os
|
3 |
+
|
4 |
+
|
5 |
+
class settings (BaseSettings):
|
6 |
+
huggingface_key : str = os.environ.get('HUGGINGFACE_API_KEY')
|
7 |
+
|
8 |
+
|
9 |
+
settings = settings()
|