Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,9 @@ import pandas as pd
|
|
2 |
import gradio as gr
|
3 |
import os
|
4 |
|
5 |
-
def compare_csv_files(
|
|
|
|
|
6 |
df1 = pd.read_csv("fish-speech-1.5.csv")
|
7 |
df2 = pd.read_csv("fish-speech-1.4.csv")
|
8 |
|
@@ -35,10 +37,10 @@ def compare_csv_files(max_num):
|
|
35 |
"""
|
36 |
|
37 |
def get_audio_html(uuid):
|
38 |
-
file_1_5 =
|
39 |
-
file_1_4 =
|
40 |
-
audio_1_5 = f'<audio controls src="{file_1_5}"></audio>' if os.path.exists(file_1_5) else "Missing Audio"
|
41 |
-
audio_1_4 = f'<audio controls src="{file_1_4}"></audio>' if os.path.exists(file_1_4) else "Missing Audio"
|
42 |
return audio_1_5, audio_1_4
|
43 |
|
44 |
merged_df["Audio_1.5"], merged_df["Audio_1.4"] = zip(*merged_df["SourceText"].apply(get_audio_html))
|
@@ -53,10 +55,9 @@ def compare_csv_files(max_num):
|
|
53 |
|
54 |
return result_html
|
55 |
|
56 |
-
max_num = gr.Number(value=10)
|
57 |
gr.Interface(
|
58 |
fn=compare_csv_files,
|
59 |
-
inputs=
|
60 |
outputs="html",
|
61 |
title="Fish Speech Benchmark",
|
62 |
description="This is a non-official model performance test from Fish Speech / Whisper Base / More data will be added later (not too much)"
|
|
|
2 |
import gradio as gr
|
3 |
import os
|
4 |
|
5 |
+
def compare_csv_files():
|
6 |
+
max_num = 10
|
7 |
+
|
8 |
df1 = pd.read_csv("fish-speech-1.5.csv")
|
9 |
df2 = pd.read_csv("fish-speech-1.4.csv")
|
10 |
|
|
|
37 |
"""
|
38 |
|
39 |
def get_audio_html(uuid):
|
40 |
+
file_1_5 = f"fish-speech-1.5/{uuid}.wav"
|
41 |
+
file_1_4 = f"fish-speech-1.4/{uuid}.wav"
|
42 |
+
audio_1_5 = f'<audio controls src="https://huggingface.co/spaces/None1145/Fish-Speech-Benchmark/resolve/main/{file_1_5}"></audio>' if os.path.exists(file_1_5) else "Missing Audio"
|
43 |
+
audio_1_4 = f'<audio controls src="https://huggingface.co/spaces/None1145/Fish-Speech-Benchmark/resolve/main/{file_1_4}"></audio>' if os.path.exists(file_1_4) else "Missing Audio"
|
44 |
return audio_1_5, audio_1_4
|
45 |
|
46 |
merged_df["Audio_1.5"], merged_df["Audio_1.4"] = zip(*merged_df["SourceText"].apply(get_audio_html))
|
|
|
55 |
|
56 |
return result_html
|
57 |
|
|
|
58 |
gr.Interface(
|
59 |
fn=compare_csv_files,
|
60 |
+
inputs=None,
|
61 |
outputs="html",
|
62 |
title="Fish Speech Benchmark",
|
63 |
description="This is a non-official model performance test from Fish Speech / Whisper Base / More data will be added later (not too much)"
|