Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -182,14 +182,12 @@ with gr.Blocks(title="Qualitative Coding Interface") as demo:
|
|
| 182 |
)
|
| 183 |
status_message = gr.Textbox(label="Status", value="Ready", scale=2)
|
| 184 |
|
| 185 |
-
#
|
| 186 |
-
# Replaced gr.Interface with the gr.File.change() method
|
| 187 |
file_input.change(
|
| 188 |
fn=process_file,
|
| 189 |
inputs=file_input,
|
| 190 |
outputs=[full_transcript_text, status_message, current_file_id, coded_data_state]
|
| 191 |
)
|
| 192 |
-
# *** END FIX ***
|
| 193 |
|
| 194 |
gr.Markdown("---")
|
| 195 |
gr.Markdown("## 📝 Interview Metadata")
|
|
@@ -238,10 +236,10 @@ with gr.Blocks(title="Qualitative Coding Interface") as demo:
|
|
| 238 |
gr.Markdown("---")
|
| 239 |
gr.Markdown("## 📊 Coded Data")
|
| 240 |
|
|
|
|
| 241 |
coded_output_df = gr.Dataframe(
|
| 242 |
label="Current Coded Segments",
|
| 243 |
interactive=False,
|
| 244 |
-
height=300
|
| 245 |
)
|
| 246 |
# Update the dataframe display whenever the hidden state changes
|
| 247 |
coded_data_state.change(lambda x: x, inputs=coded_data_state, outputs=coded_output_df)
|
|
|
|
| 182 |
)
|
| 183 |
status_message = gr.Textbox(label="Status", value="Ready", scale=2)
|
| 184 |
|
| 185 |
+
# File upload change event
|
|
|
|
| 186 |
file_input.change(
|
| 187 |
fn=process_file,
|
| 188 |
inputs=file_input,
|
| 189 |
outputs=[full_transcript_text, status_message, current_file_id, coded_data_state]
|
| 190 |
)
|
|
|
|
| 191 |
|
| 192 |
gr.Markdown("---")
|
| 193 |
gr.Markdown("## 📝 Interview Metadata")
|
|
|
|
| 236 |
gr.Markdown("---")
|
| 237 |
gr.Markdown("## 📊 Coded Data")
|
| 238 |
|
| 239 |
+
# FIX: Removed the 'height=300' argument which caused the TypeError
|
| 240 |
coded_output_df = gr.Dataframe(
|
| 241 |
label="Current Coded Segments",
|
| 242 |
interactive=False,
|
|
|
|
| 243 |
)
|
| 244 |
# Update the dataframe display whenever the hidden state changes
|
| 245 |
coded_data_state.change(lambda x: x, inputs=coded_data_state, outputs=coded_output_df)
|