SorrelC commited on
Commit
9417e04
·
verified ·
1 Parent(s): 8973796

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -218,15 +218,11 @@ def process_text(input_text, primary1, synonyms1, primary2, synonyms2, primary3,
218
  # Create results summary
219
  results_summary = f"""
220
  ## Results Summary
221
-
222
  **Keywords Found:** {len(keywords_list)}
223
-
224
  **Matched Keywords:** {found_keywords_str}
225
-
226
  **Keyword Dictionary Stats:**
227
  - Primary keywords loaded: {len(keywords_dict)}
228
  - Total searchable terms: {sum(len(synonyms) + 1 for synonyms in keywords_dict.values())}
229
-
230
  **Copy this result to your spreadsheet:**
231
  {found_keywords_str}
232
  """
@@ -235,7 +231,8 @@ def process_text(input_text, primary1, synonyms1, primary2, synonyms2, primary3,
235
 
236
  # Create the Gradio interface
237
  def create_interface():
238
- with gr.Blocks(title="Keyword Tagging Tool", theme=gr.themes.Soft()) as demo:
 
239
  gr.HTML("""
240
  <h1>Controlled Vocabluary Keyword Tagging Tool</h1>
241
 
@@ -405,4 +402,5 @@ def create_interface():
405
 
406
  if __name__ == "__main__":
407
  demo = create_interface()
408
- demo.launch()
 
 
218
  # Create results summary
219
  results_summary = f"""
220
  ## Results Summary
 
221
  **Keywords Found:** {len(keywords_list)}
 
222
  **Matched Keywords:** {found_keywords_str}
 
223
  **Keyword Dictionary Stats:**
224
  - Primary keywords loaded: {len(keywords_dict)}
225
  - Total searchable terms: {sum(len(synonyms) + 1 for synonyms in keywords_dict.values())}
 
226
  **Copy this result to your spreadsheet:**
227
  {found_keywords_str}
228
  """
 
231
 
232
  # Create the Gradio interface
233
  def create_interface():
234
+ # Note: theme moved to launch() for Gradio 6.0 compatibility
235
+ with gr.Blocks(title="Keyword Tagging Tool") as demo:
236
  gr.HTML("""
237
  <h1>Controlled Vocabluary Keyword Tagging Tool</h1>
238
 
 
402
 
403
  if __name__ == "__main__":
404
  demo = create_interface()
405
+ # Gradio 6.0 compatibility: theme and ssr_mode moved to launch()
406
+ demo.launch(ssr_mode=False, theme=gr.themes.Soft())