cbensimon's picture
cbensimon HF staff
Update app.py
f25e818
raw
history blame contribute delete
No virus
380 Bytes
import uvicorn
from fastapi import FastAPI
from fastapi.responses import RedirectResponse
app = FastAPI()
@app.get('/')
def redirect():
return RedirectResponse('./home')
@app.post('/login')
def redirect():
return RedirectResponse('./home')
@app.get('/home')
def home():
return 'Hello world!'
if __name__ == '__main__':
uvicorn.run(app, host="0.0.0.0", port=7860)