Spaces:
Runtime error
Runtime error
osanseviero commited on
Commit ·
b916cdf
1
Parent(s): 466567d
Space part 1
Browse filesFiles changed (6)
- DockerfileAdded+11
- README.md+1-1
- index.htmlDeleted-24
- main.pyAdded+7
- requirements.txtAdded+7
- style.cssDeleted-28
1234567891011FROM python:3.9
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./main.py /code/app/main.py
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]2 unmodified lines34567892 unmodified linesemoji: 🐢colorFrom: purplecolorTo: bluesdk: staticpinned: false---2 unmodified lines34567892 unmodified linesemoji: 🐢colorFrom: purplecolorTo: bluesdk: dockerpinned: false---
123456789101112131415161718192021222324<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>My static Space</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="card"> <h1>Welcome to your static Space!</h1> <p> You can modify this app directly by editing <i>index.html</i> in the Files and versions tab. </p> <p> Also don't forget to check the <a href="https://huggingface.co/docs/hub/spaces" target="_blank" >Spaces documentation</a >. </p> </div> </body></html>1234567from fastapi import FastAPI
app = FastAPI()
@app.get("/")def read_root(): return {"Hello": "World!"}1234567fastapi==0.74.*requests==2.27.*sentencepiece==0.1.*torch==1.11.*transformers==4.*uvicorn[standard]==0.17.*
12345678910111213141516171819202122232425262728body { padding: 2rem; font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;}
h1 { font-size: 16px; margin-top: 0;}
p { color: rgb(107, 114, 128); font-size: 15px; margin-bottom: 10px; margin-top: 5px;}
.card { max-width: 620px; margin: 0 auto; padding: 16px; border: 1px solid lightgray; border-radius: 16px;}
.card p:last-child { margin-bottom: 0;}DockerfileAdded+11
README.md+1-1
index.htmlDeleted-24
main.pyAdded+7
requirements.txtAdded+7
style.cssDeleted-28