nero7151 commited on
Commit
9c5c10e
·
1 Parent(s): c957cc9

README.md 삭제

Browse files
Files changed (10) hide show
  1. Dockerfile +0 -9
  2. README.md +0 -11
  3. app/main.py +0 -22
  4. dockerfile +0 -9
  5. read.md +0 -0
  6. requirements.txt +0 -4
  7. space.zip +0 -3
  8. space/app/main.py +0 -7
  9. space/dockerfile +0 -9
  10. space/requirements.txt +0 -2
Dockerfile DELETED
@@ -1,9 +0,0 @@
1
- FROM python:3.10
2
-
3
- WORKDIR /app
4
-
5
- COPY . /app
6
-
7
- RUN pip install --no-cache-dir -r requirements.txt
8
-
9
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
README.md DELETED
@@ -1,11 +0,0 @@
1
- ---
2
- title: SPOON AI
3
- emoji: 😻
4
- colorFrom: green
5
- colorTo: gray
6
- sdk: docker
7
- pinned: false
8
- short_description: create food recipe
9
- ---
10
-
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
app/main.py DELETED
@@ -1,22 +0,0 @@
1
- from fastapi import FastAPI, Request
2
- from transformers import pipeline
3
-
4
- # 모델 로드
5
- generator = pipeline("text-generation", model="gpt2")
6
-
7
- app = FastAPI()
8
-
9
- @app.get("/")
10
- def root():
11
- return {"message": "✅ FastAPI with Hugging Face GPT2!"}
12
-
13
- @app.post("/generate")
14
- async def generate_text(request: Request):
15
- body = await request.json()
16
- prompt = body.get("prompt", "")
17
-
18
- if not prompt:
19
- return {"error": "Missing 'prompt' field"}
20
-
21
- result = generator(prompt, max_length=50, do_sample=True)
22
- return {"generated_text": result[0]["generated_text"]}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dockerfile DELETED
@@ -1,9 +0,0 @@
1
- FROM python:3.10
2
-
3
- WORKDIR /app
4
-
5
- COPY . /app
6
-
7
- RUN pip install --no-cache-dir -r requirements.txt
8
-
9
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
read.md DELETED
File without changes
requirements.txt DELETED
@@ -1,4 +0,0 @@
1
- fastapi
2
- uvicorn[standard]
3
- transformers
4
- torch
 
 
 
 
 
space.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:283db35aa3603b256a10193f4abb3fadd846d83a6ae077676087150304e62afa
3
- size 1157
 
 
 
 
space/app/main.py DELETED
@@ -1,7 +0,0 @@
1
- from fastapi import FastAPI
2
-
3
- app = FastAPI()
4
-
5
- @app.get("/")
6
- def read_root():
7
- return {"message": "✅ Hello from FastAPI in Docker Space!"}
 
 
 
 
 
 
 
 
space/dockerfile DELETED
@@ -1,9 +0,0 @@
1
- FROM python:3.10
2
-
3
- WORKDIR /app
4
-
5
- COPY . /app
6
-
7
- RUN pip install --no-cache-dir -r requirements.txt
8
-
9
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
space/requirements.txt DELETED
@@ -1,2 +0,0 @@
1
- fastapi
2
- uvicorn