Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ def generate_checklist(pdf_file):
|
|
| 34 |
Structured Checklist:
|
| 35 |
"""
|
| 36 |
try:
|
| 37 |
-
|
| 38 |
model="gpt-4",
|
| 39 |
messages=[{"role": "system", "content": prompt}],
|
| 40 |
temperature=0.3,
|
|
@@ -43,6 +43,7 @@ def generate_checklist(pdf_file):
|
|
| 43 |
checklist = response.choices[0].message.content
|
| 44 |
except Exception as e:
|
| 45 |
checklist = f"Error generating checklist: {str(e)}"
|
|
|
|
| 46 |
return checklist
|
| 47 |
|
| 48 |
# Define Gradio UI
|
|
|
|
| 34 |
Structured Checklist:
|
| 35 |
"""
|
| 36 |
try:
|
| 37 |
+
response = client.chat.completions.create(
|
| 38 |
model="gpt-4",
|
| 39 |
messages=[{"role": "system", "content": prompt}],
|
| 40 |
temperature=0.3,
|
|
|
|
| 43 |
checklist = response.choices[0].message.content
|
| 44 |
except Exception as e:
|
| 45 |
checklist = f"Error generating checklist: {str(e)}"
|
| 46 |
+
|
| 47 |
return checklist
|
| 48 |
|
| 49 |
# Define Gradio UI
|