Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def random_data_viewer(file):
|
|
21 |
|
22 |
random_entry = random.choice(data)
|
23 |
# 格式化输出为Markdown
|
24 |
-
output = "\n".join([f"**{key}**: {
|
25 |
return output, data # 返回数据以存储供后续使用
|
26 |
|
27 |
def sample_more(data):
|
@@ -31,7 +31,7 @@ def sample_more(data):
|
|
31 |
|
32 |
random_entry = random.choice(data)
|
33 |
# 格式化输出为Markdown
|
34 |
-
output = "\n".join([f"**{key}**: {
|
35 |
return output
|
36 |
|
37 |
# Gradio 界面
|
|
|
21 |
|
22 |
random_entry = random.choice(data)
|
23 |
# 格式化输出为Markdown
|
24 |
+
output = "\n".join([f"**{key}**: {value}" for key, value in random_entry.items()])
|
25 |
return output, data # 返回数据以存储供后续使用
|
26 |
|
27 |
def sample_more(data):
|
|
|
31 |
|
32 |
random_entry = random.choice(data)
|
33 |
# 格式化输出为Markdown
|
34 |
+
output = "\n".join([f"**{key}**: {value}" for key, value in random_entry.items()])
|
35 |
return output
|
36 |
|
37 |
# Gradio 界面
|