Araeynn commited on
Commit
2469679
1 Parent(s): fa3bb06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -15,6 +15,16 @@ def execute_code():
15
 
16
  if __name__ == '__main__':
17
  def startServer():
 
 
 
 
 
 
 
 
 
 
18
  app.run(host='0.0.0.0', port=12345)
19
  multiprocessing.Process(target=startServer).start()
20
  def startGradio():
 
15
 
16
  if __name__ == '__main__':
17
  def startServer():
18
+ hostname = socket.gethostname()
19
+
20
+ # Get the server's IP address
21
+ ip_address = socket.gethostbyname(hostname)
22
+
23
+ # Set the port number
24
+ port = 12345
25
+
26
+ # Print the URL
27
+ print(f"Server running at http://{ip_address}:{port}/")
28
  app.run(host='0.0.0.0', port=12345)
29
  multiprocessing.Process(target=startServer).start()
30
  def startGradio():