Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -362,6 +362,12 @@ def show_field(f: Field, index: int, data_collected):
|
|
| 362 |
md_path = os.path.join(input_repo_path, "dialogues", dialogue_name)
|
| 363 |
content = load_text(md_path)
|
| 364 |
st.markdown(content, unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 365 |
else:
|
| 366 |
path = f.other_params.get("path") if f.other_params else None
|
| 367 |
if path:
|
|
|
|
| 362 |
md_path = os.path.join(input_repo_path, "dialogues", dialogue_name)
|
| 363 |
content = load_text(md_path)
|
| 364 |
st.markdown(content, unsafe_allow_html=True)
|
| 365 |
+
elif f.other_params and f.other_params.get("use_roledesc_name"):
|
| 366 |
+
row = st.session_state.data.iloc[index]
|
| 367 |
+
role_name = row["role_name"]
|
| 368 |
+
md_path = os.path.join(input_repo_path, "role_descriptions", role_name)
|
| 369 |
+
content = load_text(md_path)
|
| 370 |
+
st.markdown(content, unsafe_allow_html=True)
|
| 371 |
else:
|
| 372 |
path = f.other_params.get("path") if f.other_params else None
|
| 373 |
if path:
|