Spaces:
Runtime error
Runtime error
Commit
·
d7d2241
1
Parent(s):
de03bde
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,8 +26,16 @@ df['image'] = df['image_url'].apply(lambda x: '<a href= "' + str(x) + '" target=
|
|
| 26 |
cols = list(df.columns)
|
| 27 |
cols.insert(0, cols.pop(cols.index('image')))
|
| 28 |
df = df.reindex(columns=cols)
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
LINES_NUMBER = 20
|
| 32 |
|
| 33 |
def display_df():
|
|
@@ -52,6 +60,7 @@ initial_dataframe = display_df()
|
|
| 52 |
# Gradio Blocks
|
| 53 |
with gr.Blocks() as demo:
|
| 54 |
gr.Markdown("<h1><center>VisIT-Bench Dataset Viewer</center></h1>")
|
|
|
|
| 55 |
|
| 56 |
with gr.Row():
|
| 57 |
num_end = gr.Number(visible=False)
|
|
|
|
| 26 |
cols = list(df.columns)
|
| 27 |
cols.insert(0, cols.pop(cols.index('image')))
|
| 28 |
df = df.reindex(columns=cols)
|
| 29 |
+
css = """
|
| 30 |
+
<style>
|
| 31 |
+
table.dataframe tr th:nth-child(1) {
|
| 32 |
+
width: 300px;
|
| 33 |
+
}
|
| 34 |
+
table.dataframe tr td:nth-child(1) {
|
| 35 |
+
width: 300px;
|
| 36 |
+
}
|
| 37 |
+
</style>
|
| 38 |
+
"""
|
| 39 |
LINES_NUMBER = 20
|
| 40 |
|
| 41 |
def display_df():
|
|
|
|
| 60 |
# Gradio Blocks
|
| 61 |
with gr.Blocks() as demo:
|
| 62 |
gr.Markdown("<h1><center>VisIT-Bench Dataset Viewer</center></h1>")
|
| 63 |
+
gr.Markdown(css)
|
| 64 |
|
| 65 |
with gr.Row():
|
| 66 |
num_end = gr.Number(visible=False)
|