AurelioAguirre commited on
Commit
801882a
·
1 Parent(s): 3356c93

Using spaces_info

Browse files
Files changed (1) hide show
  1. main/main.py +4 -2
main/main.py CHANGED
@@ -7,7 +7,7 @@ from pathlib import Path
7
  from litgpt.api import LLM
8
  import os
9
  import uvicorn
10
- import whatismyip
11
 
12
  # Set up logging
13
  logging.basicConfig(level=logging.INFO)
@@ -170,7 +170,9 @@ def main():
170
  port = int(os.getenv("LLM_ENGINE_PORT", "8001"))
171
 
172
  # Start the server
173
- logger.warning(f"Exposing IP {whatismyip.whatismyip()}")
 
 
174
  uvicorn.run(
175
  app,
176
  host=host,
 
7
  from litgpt.api import LLM
8
  import os
9
  import uvicorn
10
+ from huggingface_hub.hf_api import HfApi
11
 
12
  # Set up logging
13
  logging.basicConfig(level=logging.INFO)
 
170
  port = int(os.getenv("LLM_ENGINE_PORT", "8001"))
171
 
172
  # Start the server
173
+ hf_a = HfApi()
174
+ space_info = hf_a.space_info("TeamGenKI/LLM-Engine")
175
+ logger.warning(f"Exposing URL: {space_info}")
176
  uvicorn.run(
177
  app,
178
  host=host,