BenTouss commited on
Commit
9288782
1 Parent(s): 97f0e64
.devcontainer/Dockerfile ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+ FROM python:3.11.4-bullseye
3
+
4
+ # run this before copying requirements for cache efficiency
5
+ RUN pip install --upgrade pip
6
+ COPY .devcontainer/requirements.txt .
7
+
8
+ RUN pip install -r requirements.txt
.devcontainer/devcontainer.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2
+ // https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/docker-existing-dockerfile
3
+ {
4
+ "name": "Existing Dockerfile",
5
+
6
+ // Sets the run context to one level up instead of the .devcontainer folder.
7
+ "context": "..",
8
+
9
+ // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
10
+ "dockerFile": "Dockerfile",
11
+ "customizations": {
12
+ "vscode": {
13
+ "extensions": [
14
+ "ms-python.python",
15
+ "ms-python.vscode-pylance",
16
+ "ms-toolsai.jupyter",
17
+ "ms-python.black-formatter",
18
+ "GitHub.copilot",
19
+ "GitHub.copilot-chat"
20
+ ]
21
+ }
22
+ },
23
+
24
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
25
+ "forwardPorts": [7860]
26
+
27
+ // Uncomment the next line to run commands after the container is created - for example installing curl.
28
+ // "postCreateCommand": "apt-get update && apt-get install -y curl",
29
+
30
+ // Uncomment when using a ptrace-based debugger like C++, Go, and Rust
31
+ // "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
32
+
33
+ // Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
34
+ // "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
35
+
36
+ // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
37
+ // "remoteUser": "vscode"
38
+ }
.devcontainer/requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ transformers
2
+ torch
3
+ gradio
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .DS_Store
app.py CHANGED
@@ -4,8 +4,6 @@ from transformers import pipeline
4
  pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
5
 
6
  def predict(input_img):
7
- print('hello!')
8
- print(input_img)
9
  predictions = pipeline(input_img)
10
  return {p["label"]: p["score"] for p in predictions}
11
 
 
4
  pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
5
 
6
  def predict(input_img):
 
 
7
  predictions = pipeline(input_img)
8
  return {p["label"]: p["score"] for p in predictions}
9