TiberiuCristianLeon commited on
Commit
eaec419
·
verified ·
1 Parent(s): 4e5cd58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -13,16 +13,18 @@ MTMODELS = {'enro': 'BlackKakapo/opus-mt-en-ro',
13
  @app.get("/")
14
  def index(request: Request):
15
  from fastapi.responses import HTMLResponse
16
- host_url = request.url.scheme + "://" + request.url.netloc
17
  html_content = f'''
18
  <html>
19
  <head>
20
- <title>Welcome</title>
21
  </head>
22
  <body>
23
- <h1>FastAPI with MCP</h1>
24
  <p>Host URL: {host_url}</p>
25
- <a href="{host_url}/docs">DOCS</a>
 
 
26
  </body>
27
  </html>
28
  '''
 
13
  @app.get("/")
14
  def index(request: Request):
15
  from fastapi.responses import HTMLResponse
16
+ host_url = "https://" + request.url.netloc
17
  html_content = f'''
18
  <html>
19
  <head>
20
+ <title>FastAPI with MCP</title>
21
  </head>
22
  <body>
23
+ <h1>FastAPI URLS</h1>
24
  <p>Host URL: {host_url}</p>
25
+ <p><a href="{host_url}/docs">DOCS</a></p>
26
+ <p><a href="{host_url}/redoc">REDOC</a></p>
27
+ <p><a href="{host_url}/openapi.json">openapi.json</a></p>
28
  </body>
29
  </html>
30
  '''