ppsingh commited on
Commit
b24879f
·
verified ·
1 Parent(s): a3af105

Update auditqa/utils.py

Browse files
Files changed (1) hide show
  1. auditqa/utils.py +3 -3
auditqa/utils.py CHANGED
@@ -77,16 +77,16 @@ def make_html_source(source,i):
77
  meta = source.metadata
78
  content = source.page_content.strip()
79
 
80
- name = meta['subtype']
81
  card = f"""
82
  <div class="card" id="doc{i}">
83
  <div class="card-content">
84
- <h2>Doc {i} - {meta['subtype']} - Page {int(meta['page'])}</h2>
85
  <p>{content}</p>
86
  </div>
87
  <div class="card-footer">
88
  <span>{name}</span>
89
- <a href="{meta['subtype']}#page={int(meta['page'])}" target="_blank" class="pdf-link">
90
  <span role="img" aria-label="Open PDF">🔗</span>
91
  </a>
92
  </div>
 
77
  meta = source.metadata
78
  content = source.page_content.strip()
79
 
80
+ name = meta['filename']
81
  card = f"""
82
  <div class="card" id="doc{i}">
83
  <div class="card-content">
84
+ <h2>Doc {i} - {meta['filename']} - Page {int(meta['page'])}</h2>
85
  <p>{content}</p>
86
  </div>
87
  <div class="card-footer">
88
  <span>{name}</span>
89
+ <a href="{meta['filename']}#page={int(meta['page'])}" target="_blank" class="pdf-link">
90
  <span role="img" aria-label="Open PDF">🔗</span>
91
  </a>
92
  </div>