acecalisto3 commited on
Commit
4beb8e3
·
verified ·
1 Parent(s): 0115f27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -1225,6 +1225,20 @@ class TestApp(unittest.TestCase):
1225
  else:
1226
  self.assertIsNone(connection)
1227
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1228
  # Main execution
1229
  if __name__ == "__main__":
1230
  # Initialize database
 
1225
  else:
1226
  self.assertIsNone(connection)
1227
 
1228
+ def main():
1229
+ # Initialize and run the application
1230
+ logging.info("Starting the application...")
1231
+ model = load_model()
1232
+ if model:
1233
+ logging.info("Application started successfully.")
1234
+ demo = create_interface()
1235
+ demo.launch(server_name="0.0.0.0", server_port=7860)
1236
+ else:
1237
+ logging.error("Failed to start the application.")
1238
+
1239
+ if __name__ == "__main__":
1240
+ main()
1241
+
1242
  # Main execution
1243
  if __name__ == "__main__":
1244
  # Initialize database