Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ from gradio_client import Client
|
|
| 7 |
client = Client("Futuresony/Mr.Events")
|
| 8 |
|
| 9 |
# Get your secure API key from environment
|
| 10 |
-
VALID_API_KEY = os.getenv("
|
| 11 |
|
| 12 |
app = FastAPI()
|
| 13 |
|
|
@@ -28,7 +28,7 @@ async def chat(request: Request):
|
|
| 28 |
# Call the model hosted on your first space
|
| 29 |
result = client.predict(
|
| 30 |
query=user_message,
|
| 31 |
-
api_key="
|
| 32 |
api_name="/chat"
|
| 33 |
)
|
| 34 |
|
|
|
|
| 7 |
client = Client("Futuresony/Mr.Events")
|
| 8 |
|
| 9 |
# Get your secure API key from environment
|
| 10 |
+
VALID_API_KEY = os.getenv("APP_API_KEY", "fs_ABnWISBWhOlqLIn6FuFqPWo8dFgy1wrk0r4EA")
|
| 11 |
|
| 12 |
app = FastAPI()
|
| 13 |
|
|
|
|
| 28 |
# Call the model hosted on your first space
|
| 29 |
result = client.predict(
|
| 30 |
query=user_message,
|
| 31 |
+
api_key="fs_ABnWISBWhOlqLIn6FuFqPWo8dFgy1wrk0r4EA", # your hosted model's internal key if needed
|
| 32 |
api_name="/chat"
|
| 33 |
)
|
| 34 |
|