Themivito commited on
Commit
ad22edc
·
verified ·
1 Parent(s): b692be2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -34,16 +34,16 @@ def generate_checklist(pdf_file):
34
  Structured Checklist:
35
  """
36
 
37
- try:
38
- response = client.chat.completions.create(
39
- model="gpt-4",
40
- messages=[{"role": "system", "content": prompt}],
41
- temperature=0.3,
42
- max_tokens=800
43
- )
44
- checklist = response["choices"][0]["message"]["content"]
45
- except Exception as e:
46
- return f"Error generating checklist: {str(e)}"
47
 
48
  return checklist
49
 
 
34
  Structured Checklist:
35
  """
36
 
37
+ try:
38
+ response = client.chat.completions.create(
39
+ model="gpt-4",
40
+ messages=[{"role": "system", "content": prompt}],
41
+ temperature=0.3,
42
+ max_tokens=800
43
+ )
44
+ checklist = response.choices[0].message.content
45
+ except Exception as e:
46
+ checklist = f"Error generating checklist: {str(e)}"
47
 
48
  return checklist
49