Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,12 +36,12 @@ def generate_checklist(pdf_file):
|
|
| 36 |
"""
|
| 37 |
|
| 38 |
try:
|
| 39 |
-
response = openai.
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
checklist = response["choices"][0]["message"]["content"]
|
| 46 |
except Exception as e:
|
| 47 |
return f"Error generating checklist: {str(e)}"
|
|
|
|
| 36 |
"""
|
| 37 |
|
| 38 |
try:
|
| 39 |
+
response = openai.client.chat.completions.create(
|
| 40 |
+
model="gpt-4",
|
| 41 |
+
messages=[{"role": "system", "content": prompt}],
|
| 42 |
+
temperature=0.3,
|
| 43 |
+
max_tokens=800
|
| 44 |
+
)
|
| 45 |
checklist = response["choices"][0]["message"]["content"]
|
| 46 |
except Exception as e:
|
| 47 |
return f"Error generating checklist: {str(e)}"
|