Josebert commited on
Commit
06a139b
·
verified ·
1 Parent(s): 209b85c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -44,7 +44,11 @@ def analyze_figure_of_speech(verse):
44
  if isinstance(output_json, list): # Ensure it's a list
45
  # Extract and format only the values, skipping keys
46
  formatted_output = "\n\n".join(
47
- "\n".join(str(value) for key, value in item.items() if value) for item in output_json
 
 
 
 
48
  )
49
  return formatted_output
50
  else:
 
44
  if isinstance(output_json, list): # Ensure it's a list
45
  # Extract and format only the values, skipping keys
46
  formatted_output = "\n\n".join(
47
+ f"{item.get('verses', '')}\n"
48
+ f"{item.get('figure', '')}\n"
49
+ f'"{item.get("phrase", "")}"\n'
50
+ f"{item.get('explanation', '')}"
51
+ for item in output_json
52
  )
53
  return formatted_output
54
  else: