fudii0921 commited on
Commit
1f46ba4
·
verified ·
1 Parent(s): 6060a99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -7,13 +7,6 @@ import cohere
7
  # Load environment variables
8
  load_dotenv(verbose=True)
9
 
10
- def on_app_close():
11
- if cursor:
12
- cursor.close()
13
- if conn:
14
- conn.close()
15
- print("MySQL connection and cursor closed")
16
-
17
  # Function to fetch top high performers
18
  #def get_top_high_performers(html: str):
19
  def get_top_high_performers(html: str, limit: str):
@@ -83,7 +76,11 @@ def get_top_high_performers(html: str, limit: str):
83
  return f"Error occurred: {e}","Error"
84
 
85
  finally:
86
- on_app_close()
 
 
 
 
87
 
88
  # Define Gradio interface
89
  interface = gr.Interface(
 
7
  # Load environment variables
8
  load_dotenv(verbose=True)
9
 
 
 
 
 
 
 
 
10
  # Function to fetch top high performers
11
  #def get_top_high_performers(html: str):
12
  def get_top_high_performers(html: str, limit: str):
 
76
  return f"Error occurred: {e}","Error"
77
 
78
  finally:
79
+ if cursor:
80
+ cursor.close()
81
+ if conn:
82
+ conn.close()
83
+ print("MySQL connection and cursor closed")
84
 
85
  # Define Gradio interface
86
  interface = gr.Interface(