lvwerra HF staff commited on
Commit
e146ae1
1 Parent(s): fb9e6d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -35,12 +35,19 @@ def process_results(results, highlight_terms):
35
  else ""
36
  )
37
  docid_html = str(result["docid"])
 
 
 
 
 
38
  results_html += """{}
39
- <p style='font-size:16px; font-family: Arial; color:#7978FF; text-align: left;'>Document ID: {}</p>
40
- <pre style='height: 400px; overflow: scroll;'><code>{}</code></pre>
 
 
41
  <br>
42
  """.format(
43
- meta_html, docid_html, text_html
44
  )
45
  return results_html + "<hr>"
46
 
 
35
  else ""
36
  )
37
  docid_html = str(result["docid"])
38
+
39
+ licenses = " | ".join(result["repo_license"])
40
+ repo_name = result["repo_name"]
41
+ repo_path = result["repo_path"]
42
+
43
  results_html += """{}
44
+ <p style='font-size:16px; font-family: Arial; text-align: left;'>Repository name: <span style='color: #20233fff;'>{}</span></p>
45
+ <p style='font-size:16px; font-family: Arial; text-align: left;'>Repository path: <span style='color: #20233fff;'>{}</span></p>
46
+ <p style='font-size:16px; font-family: Arial; text-align: left;'>Repository licenses: <span style='color: #20233fff;'>{}</span></p>
47
+ <pre style='height: 600px; overflow: scroll;'><code>{}</code></pre>
48
  <br>
49
  """.format(
50
+ meta_html, repo_name, repo_path, licenses, text_html
51
  )
52
  return results_html + "<hr>"
53