Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ def load_json(file_name):
|
|
11 |
with open(file_path, "r", encoding="utf-8") as f:
|
12 |
return json.load(f)
|
13 |
|
14 |
-
显示单个字典的信息
|
15 |
def display_dict(data):
|
16 |
st.write("### 文件信息")
|
17 |
st.write(f"**Path:** {data['path']}")
|
@@ -20,12 +20,6 @@ def display_dict(data):
|
|
20 |
st.write("### Table")
|
21 |
st.markdown(data['table_html'], unsafe_allow_html=True)
|
22 |
|
23 |
-
|
24 |
-
st.write("")
|
25 |
-
st.write("")
|
26 |
-
st.write("")
|
27 |
-
st.write("")
|
28 |
-
st.write("")
|
29 |
st.write("### Context")
|
30 |
# 拼接 all_context 并高亮 target_context_ids 的句子
|
31 |
all_context = data["all_context"]
|
@@ -49,10 +43,6 @@ def display_dict(data):
|
|
49 |
st.write("**Perturbed Explanation:**")
|
50 |
st.write(data["output"]["perturbed_explanation"])
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
# 主程序
|
57 |
def main():
|
58 |
st.title("Perturb For Table")
|
|
|
11 |
with open(file_path, "r", encoding="utf-8") as f:
|
12 |
return json.load(f)
|
13 |
|
14 |
+
# 显示单个字典的信息
|
15 |
def display_dict(data):
|
16 |
st.write("### 文件信息")
|
17 |
st.write(f"**Path:** {data['path']}")
|
|
|
20 |
st.write("### Table")
|
21 |
st.markdown(data['table_html'], unsafe_allow_html=True)
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
st.write("### Context")
|
24 |
# 拼接 all_context 并高亮 target_context_ids 的句子
|
25 |
all_context = data["all_context"]
|
|
|
43 |
st.write("**Perturbed Explanation:**")
|
44 |
st.write(data["output"]["perturbed_explanation"])
|
45 |
|
|
|
|
|
|
|
|
|
46 |
# 主程序
|
47 |
def main():
|
48 |
st.title("Perturb For Table")
|