Spaces:
Runtime error
Runtime error
upd
Browse files
app.py
CHANGED
|
@@ -28,7 +28,8 @@ df.columns = [
|
|
| 28 |
def create_image_md(game_name, spec_num):
|
| 29 |
url = f"https://huggingface.co/datasets/litagin/Galgame_Dataset_stats/resolve/main/specs/{game_name}/spec{spec_num}.png"
|
| 30 |
|
| 31 |
-
|
|
|
|
| 32 |
|
| 33 |
|
| 34 |
# ζ°γγεγθΏ½ε
|
|
@@ -42,6 +43,7 @@ df_display = df[
|
|
| 42 |
"speakers",
|
| 43 |
"mono",
|
| 44 |
"stereo",
|
|
|
|
| 45 |
"bitrate",
|
| 46 |
"sr",
|
| 47 |
"spec1",
|
|
@@ -51,9 +53,17 @@ df_display = df[
|
|
| 51 |
"spec5",
|
| 52 |
]
|
| 53 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
with gr.Blocks() as app:
|
| 56 |
-
gr.Markdown(
|
| 57 |
gr.DataFrame(
|
| 58 |
df_display,
|
| 59 |
elem_id="df",
|
|
@@ -64,15 +74,15 @@ with gr.Blocks() as app:
|
|
| 64 |
"number",
|
| 65 |
"number",
|
| 66 |
"number",
|
|
|
|
| 67 |
"markdown",
|
| 68 |
"markdown",
|
| 69 |
"markdown",
|
| 70 |
"markdown",
|
| 71 |
"markdown",
|
| 72 |
],
|
| 73 |
-
column_widths=[100, 100, 100, 100, 100, 100, 300, 300, 300, 300, 300],
|
| 74 |
wrap=True,
|
| 75 |
-
height=800,
|
| 76 |
)
|
| 77 |
|
| 78 |
app.launch(inbrowser=True)
|
|
|
|
| 28 |
def create_image_md(game_name, spec_num):
|
| 29 |
url = f"https://huggingface.co/datasets/litagin/Galgame_Dataset_stats/resolve/main/specs/{game_name}/spec{spec_num}.png"
|
| 30 |
|
| 31 |
+
# Add clickable link that leads to the image URL
|
| 32 |
+
return f"[]({url})"
|
| 33 |
|
| 34 |
|
| 35 |
# ζ°γγεγθΏ½ε
|
|
|
|
| 43 |
"speakers",
|
| 44 |
"mono",
|
| 45 |
"stereo",
|
| 46 |
+
"duration",
|
| 47 |
"bitrate",
|
| 48 |
"sr",
|
| 49 |
"spec1",
|
|
|
|
| 53 |
"spec5",
|
| 54 |
]
|
| 55 |
]
|
| 56 |
+
md = """
|
| 57 |
+
# Galgame_Dataset Stats Viewer
|
| 58 |
+
|
| 59 |
+
- Viewer for [stats and 5 spectrograms](https://huggingface.co/datasets/litagin/Galgame_Dataset_stats) of each game in [OOPPEENN/Galgame_Dataset](https://huggingface.co/datasets/OOPPEENN/Galgame_Dataset)
|
| 60 |
+
- `bitrate`: in kbps
|
| 61 |
+
- `sr`: in kHz
|
| 62 |
+
- `duration`: in hours
|
| 63 |
+
"""
|
| 64 |
|
| 65 |
with gr.Blocks() as app:
|
| 66 |
+
gr.Markdown(md)
|
| 67 |
gr.DataFrame(
|
| 68 |
df_display,
|
| 69 |
elem_id="df",
|
|
|
|
| 74 |
"number",
|
| 75 |
"number",
|
| 76 |
"number",
|
| 77 |
+
"number",
|
| 78 |
"markdown",
|
| 79 |
"markdown",
|
| 80 |
"markdown",
|
| 81 |
"markdown",
|
| 82 |
"markdown",
|
| 83 |
],
|
| 84 |
+
column_widths=[100, 100, 100, 100, 100, 100, 100, 300, 300, 300, 300, 300],
|
| 85 |
wrap=True,
|
|
|
|
| 86 |
)
|
| 87 |
|
| 88 |
app.launch(inbrowser=True)
|