Spaces:
Sleeping
Sleeping
gera
commited on
Commit
·
981cdfb
1
Parent(s):
4cf0c03
OPENAI_API_KEY rename, and automatic
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ MODEL = 'gpt-4-turbo'
|
|
| 10 |
PRICE_PER_M = 10.00
|
| 11 |
LIMIT = 125000 # some space for answer
|
| 12 |
|
| 13 |
-
api_key = os_getenv("
|
| 14 |
client = OpenAI(api_key=api_key)
|
| 15 |
|
| 16 |
def new_state():
|
|
@@ -131,9 +131,7 @@ with gr.Blocks(title="Book summarization and more") as demo:
|
|
| 131 |
files.upload(files_ready, [files, state], [letters, tokens, cost, state])
|
| 132 |
files.change(files_changed, [files, state], [letters, tokens, cost, state])
|
| 133 |
|
| 134 |
-
|
| 135 |
auth=os_getenv("APP_USERS", "null")
|
| 136 |
auth=json_loads(auth)
|
| 137 |
|
| 138 |
demo.launch(auth=auth)
|
| 139 |
-
|
|
|
|
| 10 |
PRICE_PER_M = 10.00
|
| 11 |
LIMIT = 125000 # some space for answer
|
| 12 |
|
| 13 |
+
api_key = os_getenv("OPENAI_API_KEY")
|
| 14 |
client = OpenAI(api_key=api_key)
|
| 15 |
|
| 16 |
def new_state():
|
|
|
|
| 131 |
files.upload(files_ready, [files, state], [letters, tokens, cost, state])
|
| 132 |
files.change(files_changed, [files, state], [letters, tokens, cost, state])
|
| 133 |
|
|
|
|
| 134 |
auth=os_getenv("APP_USERS", "null")
|
| 135 |
auth=json_loads(auth)
|
| 136 |
|
| 137 |
demo.launch(auth=auth)
|
|
|