Spaces:
Sleeping
Sleeping
TintinMeimei
commited on
Commit
•
24d5403
1
Parent(s):
c494d85
Update main.py
Browse files
main.py
CHANGED
@@ -1,9 +1,12 @@
|
|
|
|
|
|
1 |
from fastapi import FastAPI
|
2 |
from fastapi.staticfiles import StaticFiles
|
3 |
from fastapi.responses import FileResponse
|
4 |
from pydantic import BaseModel
|
5 |
import openai
|
6 |
-
openai.api_key = "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"
|
|
|
7 |
|
8 |
app = FastAPI()
|
9 |
class ChatInput(BaseModel):
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
from fastapi import FastAPI
|
4 |
from fastapi.staticfiles import StaticFiles
|
5 |
from fastapi.responses import FileResponse
|
6 |
from pydantic import BaseModel
|
7 |
import openai
|
8 |
+
#openai.api_key = "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"
|
9 |
+
api_key = os.environ.getattribute("apikey")
|
10 |
|
11 |
app = FastAPI()
|
12 |
class ChatInput(BaseModel):
|