Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,7 @@
|
|
| 1 |
import marimo
|
| 2 |
|
| 3 |
__generated_with = "0.11.17"
|
| 4 |
-
app = marimo.App(
|
| 5 |
-
layout_file="layouts/app.slides.json",
|
| 6 |
-
css_file="custom.css",
|
| 7 |
-
)
|
| 8 |
|
| 9 |
|
| 10 |
@app.cell(hide_code=True)
|
|
@@ -39,9 +36,9 @@ def _(Optional, httpx, json, os):
|
|
| 39 |
|
| 40 |
# Set up headers and endpoints based on provider
|
| 41 |
if self.provider == 'openai':
|
| 42 |
-
self.api_key =
|
| 43 |
if not self.api_key:
|
| 44 |
-
raise ValueError('
|
| 45 |
self.headers = {'Content-Type': 'application/json', 'Authorization': f'Bearer {self.api_key}'}
|
| 46 |
self.endpoint = 'https://openrouter.ai/api/v1/chat/completions'
|
| 47 |
self.default_model = 'openai/gpt-4o-mini'
|
|
@@ -1547,19 +1544,6 @@ def _():
|
|
| 1547 |
return
|
| 1548 |
|
| 1549 |
|
| 1550 |
-
@app.cell
|
| 1551 |
-
def _(display_response, form1):
|
| 1552 |
-
display_response(form1)
|
| 1553 |
-
return
|
| 1554 |
-
|
| 1555 |
-
|
| 1556 |
-
@app.cell
|
| 1557 |
-
def _(display_response, form10):
|
| 1558 |
-
# Display response for technique #10
|
| 1559 |
-
display_response(form10)
|
| 1560 |
-
return
|
| 1561 |
-
|
| 1562 |
-
|
| 1563 |
@app.cell
|
| 1564 |
def _(mo):
|
| 1565 |
mo.md(
|
|
|
|
| 1 |
import marimo
|
| 2 |
|
| 3 |
__generated_with = "0.11.17"
|
| 4 |
+
app = marimo.App(layout_file="layouts/app.slides.json", css_file="custom.css")
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
|
| 7 |
@app.cell(hide_code=True)
|
|
|
|
| 36 |
|
| 37 |
# Set up headers and endpoints based on provider
|
| 38 |
if self.provider == 'openai':
|
| 39 |
+
self.api_key = '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'
|
| 40 |
if not self.api_key:
|
| 41 |
+
raise ValueError('OPENAI_API_KEY environment variable not set')
|
| 42 |
self.headers = {'Content-Type': 'application/json', 'Authorization': f'Bearer {self.api_key}'}
|
| 43 |
self.endpoint = 'https://openrouter.ai/api/v1/chat/completions'
|
| 44 |
self.default_model = 'openai/gpt-4o-mini'
|
|
|
|
| 1544 |
return
|
| 1545 |
|
| 1546 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1547 |
@app.cell
|
| 1548 |
def _(mo):
|
| 1549 |
mo.md(
|