Tonic commited on
Commit
593b7a9
1 Parent(s): b4ae1f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -99,9 +99,11 @@ def convert_to_markdown(vectara_response):
99
  sources = response_set.get('response', [])[:5]
100
  sources_text = [source.get('text', '') for source in sources]
101
 
102
- # Format the summary and sources as Markdown
103
  markdown_summary = f'**Summary:** {summary_text}\n\n'
104
- markdown_sources = "\n".join([f'{i + 1}. {source}' for i, source in enumerate(sources_text)])
 
 
105
 
106
  return f"{markdown_summary}**Sources:**\n{markdown_sources}"
107
  else:
 
99
  sources = response_set.get('response', [])[:5]
100
  sources_text = [source.get('text', '') for source in sources]
101
 
102
+ # Format the summary as Markdown
103
  markdown_summary = f'**Summary:** {summary_text}\n\n'
104
+
105
+ # Format the sources as a numbered list
106
+ markdown_sources = "\n".join([f"{i+1}. {source}" for i, source in enumerate(sources_text)])
107
 
108
  return f"{markdown_summary}**Sources:**\n{markdown_sources}"
109
  else: