akhaliq HF staff commited on
Commit
629fec2
1 Parent(s): cad972e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -57,12 +57,12 @@ Please generate the Gradio code based on the provided image, focusing on the mos
57
  )
58
 
59
  # Debug: Print relevant parts of the response
60
- print("API Response Status:", response.status_code)
61
- print("API Response Choices:", response.choices)
62
 
63
  # Extract the generated code from the response
64
  if response.choices and response.choices[0].message:
65
  generated_code = response.choices[0].message.content
 
66
  else:
67
  return "Error: Unexpected response structure from the API."
68
 
 
57
  )
58
 
59
  # Debug: Print relevant parts of the response
60
+ print("API Response received. Content available:", bool(response.choices))
 
61
 
62
  # Extract the generated code from the response
63
  if response.choices and response.choices[0].message:
64
  generated_code = response.choices[0].message.content
65
+ print("Generated code length:", len(generated_code))
66
  else:
67
  return "Error: Unexpected response structure from the API."
68