Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,12 +2,11 @@ import gradio as gr
|
|
| 2 |
import requests
|
| 3 |
|
| 4 |
def chat_with_pdf(content):
|
| 5 |
-
|
| 6 |
-
api_key = os.getenv('CHATPDFKEY')
|
| 7 |
if not api_key:
|
| 8 |
return "API key (CHATPDFKEY) not set in environment variables."
|
| 9 |
|
| 10 |
-
|
| 11 |
"x-api-key": api_key,
|
| 12 |
"Content-Type": "application/json",
|
| 13 |
}
|
|
|
|
| 2 |
import requests
|
| 3 |
|
| 4 |
def chat_with_pdf(content):
|
| 5 |
+
api_key = os.getenv('CHATPDFKEY')
|
|
|
|
| 6 |
if not api_key:
|
| 7 |
return "API key (CHATPDFKEY) not set in environment variables."
|
| 8 |
|
| 9 |
+
headers = {
|
| 10 |
"x-api-key": api_key,
|
| 11 |
"Content-Type": "application/json",
|
| 12 |
}
|