kokluch commited on
Commit
f8cd8cc
Β·
1 Parent(s): 649a06b

Initial commit

Browse files
Files changed (4) hide show
  1. Dockerfile +13 -0
  2. README.md +1 -1
  3. app.py +8 -0
  4. requirements.txt +2 -0
Dockerfile ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ FROM python:3.12
5
+
6
+ WORKDIR /app
7
+
8
+ COPY requirements.txt .
9
+
10
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
+
12
+ COPY . /app
13
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Phishing Detector
3
  emoji: πŸŒ–
4
  colorFrom: red
5
  colorTo: green
 
1
  ---
2
+ title: Phishing Detector API
3
  emoji: πŸŒ–
4
  colorFrom: red
5
  colorTo: green
app.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+
3
+ app = FastAPI()
4
+
5
+ @app.get("/")
6
+ def greet_json():
7
+ return {"Hello": "World!"}
8
+
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ fastapi
2
+ uvicorn[standard]