Spaces:
Runtime error
Runtime error
rajeshradhakrishnan
commited on
Commit
·
8d63192
1
Parent(s):
f3b1912
English-Malayalam Translate v11
Browse files
main.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
from fastapi import FastAPI
|
2 |
from fastapi.staticfiles import StaticFiles
|
3 |
from fastapi.responses import FileResponse
|
@@ -31,6 +32,6 @@ app.mount("/", StaticFiles(directory="static", html=True), name="static")
|
|
31 |
# return FileResponse(path="/app/static/index.html", media_type="text/html")
|
32 |
|
33 |
@app.get("/")
|
34 |
-
|
35 |
apikey = {"APIKEY": os.environ.get("API_KEY")}
|
36 |
return templates.TemplateResponse("index.html", {"apikey": apikey})
|
|
|
1 |
+
import os
|
2 |
from fastapi import FastAPI
|
3 |
from fastapi.staticfiles import StaticFiles
|
4 |
from fastapi.responses import FileResponse
|
|
|
32 |
# return FileResponse(path="/app/static/index.html", media_type="text/html")
|
33 |
|
34 |
@app.get("/")
|
35 |
+
def index():
|
36 |
apikey = {"APIKEY": os.environ.get("API_KEY")}
|
37 |
return templates.TemplateResponse("index.html", {"apikey": apikey})
|