VyLala commited on
Commit
c80d5dd
·
verified ·
1 Parent(s): 9b5a9b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -18
app.py CHANGED
@@ -1140,30 +1140,20 @@ with gr.Blocks() as interface:
1140
 
1141
 
1142
  def make_html_table(rows):
1143
- # html = """
1144
- # <div style='overflow-x: auto; padding: 10px;'>
1145
- # <div style='max-height: 400px; overflow-y: auto; border: 1px solid #444; border-radius: 8px;'>
1146
- # <table style='width:100%; border-collapse: collapse; table-layout: auto; font-size: 14px; color: #f1f1f1; background-color: #1e1e1e;'>
1147
- # <thead style='position: sticky; top: 0; background-color: #2c2c2c; z-index: 1;'>
1148
- # <tr>
1149
- # """
1150
-
1151
  html = """
1152
- <div style='overflow-x: auto; padding: 10px;'>
1153
- <div style='max-height: 400px; overflow-y: auto; border: 1px solid #ccc; border-radius: 8px;'>
1154
- <table style='width:100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; color: inherit; background-color: inherit;'>
1155
- """
1156
-
 
 
1157
  headers = ["No.", "Sample ID", "Predicted Country", "Country Explanation", "Predicted Sample Type", "Sample Type Explanation", "Sources", "Time cost"]
1158
  html += "".join(
1159
  f"<th style='padding: 10px; border: 1px solid #555; text-align: left; white-space: nowrap;'>{h}</th>"
1160
  for h in headers
1161
  )
1162
- # html += "<thead style='position: sticky; top: 0; background-color: #2c2c2c; z-index: 1;'><tr>"
1163
- # html += "".join(
1164
- # f"<th style='padding: 10px; border: 1px solid #555; text-align: left; white-space: nowrap;'>{h}</th>"
1165
- # for h in headers
1166
- # )
1167
  html += "</tr></thead><tbody>"
1168
 
1169
 
 
1140
 
1141
 
1142
  def make_html_table(rows):
 
 
 
 
 
 
 
 
1143
  html = """
1144
+ <div style='overflow-x: auto; padding: 10px;'>
1145
+ <div style='max-height: 400px; overflow-y: auto; border: 1px solid #444; border-radius: 8px;'>
1146
+ <table style='width:100%; border-collapse: collapse; table-layout: auto; font-size: 14px; color: #f1f1f1; background-color: #1e1e1e;'>
1147
+ <thead style='position: sticky; top: 0; background-color: #2c2c2c; z-index: 1;'>
1148
+ <tr>
1149
+ """
1150
+
1151
  headers = ["No.", "Sample ID", "Predicted Country", "Country Explanation", "Predicted Sample Type", "Sample Type Explanation", "Sources", "Time cost"]
1152
  html += "".join(
1153
  f"<th style='padding: 10px; border: 1px solid #555; text-align: left; white-space: nowrap;'>{h}</th>"
1154
  for h in headers
1155
  )
1156
+
 
 
 
 
1157
  html += "</tr></thead><tbody>"
1158
 
1159