Spaces:
Running
Running
Revoke No Filter
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ def get_meeting_types():
|
|
| 25 |
meeting_types = [row[0] for row in cur.fetchall()]
|
| 26 |
cur.close()
|
| 27 |
conn.close()
|
| 28 |
-
return meeting_types
|
| 29 |
|
| 30 |
# Format seconds as HH:MM:SS
|
| 31 |
def format_seconds(seconds):
|
|
@@ -81,10 +81,10 @@ def search_transcripts(query, meeting_type, start_date, end_date):
|
|
| 81 |
"""
|
| 82 |
params = [f"%{query}%"]
|
| 83 |
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
if start_date and end_date:
|
| 89 |
sql += " AND w.meeting_date BETWEEN %s AND %s"
|
| 90 |
params.extend([start_date, end_date])
|
|
@@ -462,5 +462,4 @@ with gr.Blocks() as app:
|
|
| 462 |
results_table.select(fn=df_transcript_callback, inputs=[full_results_state], outputs=[transcript_bttn])
|
| 463 |
|
| 464 |
|
| 465 |
-
app.launch()
|
| 466 |
-
|
|
|
|
| 25 |
meeting_types = [row[0] for row in cur.fetchall()]
|
| 26 |
cur.close()
|
| 27 |
conn.close()
|
| 28 |
+
return ["No Filter"] + meeting_types
|
| 29 |
|
| 30 |
# Format seconds as HH:MM:SS
|
| 31 |
def format_seconds(seconds):
|
|
|
|
| 81 |
"""
|
| 82 |
params = [f"%{query}%"]
|
| 83 |
|
| 84 |
+
if meeting_type and "No Filter" not in meeting_type:
|
| 85 |
+
sql += " AND w.meeting_type = ANY(%s)"
|
| 86 |
+
params.append(meeting_type)
|
| 87 |
+
|
| 88 |
if start_date and end_date:
|
| 89 |
sql += " AND w.meeting_date BETWEEN %s AND %s"
|
| 90 |
params.extend([start_date, end_date])
|
|
|
|
| 462 |
results_table.select(fn=df_transcript_callback, inputs=[full_results_state], outputs=[transcript_bttn])
|
| 463 |
|
| 464 |
|
| 465 |
+
app.launch()
|
|
|