gokulraj commited on
Commit
e117800
·
1 Parent(s): bf3bbcf

final html test

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -4,7 +4,15 @@ from fastapi.responses import HTMLResponse
4
  app = FastAPI()
5
 
6
  @app.get("/", response_class=HTMLResponse)
7
- async def serve_html():
8
- # Read the HTML file content
9
- html_content = html_file_path.read_text(encoding='utf-8')
 
 
 
 
 
 
 
 
10
  return HTMLResponse(content=html_content, status_code=200)
 
4
  app = FastAPI()
5
 
6
  @app.get("/", response_class=HTMLResponse)
7
+ async def read_items():
8
+ html_content = """
9
+ <html>
10
+ <head>
11
+ <title>Some HTML in here</title>
12
+ </head>
13
+ <body>
14
+ <h1>Look ma! HTML!</h1>
15
+ </body>
16
+ </html>
17
+ """
18
  return HTMLResponse(content=html_content, status_code=200)