James Espichan Vilca commited on
Commit
b2c9c78
·
1 Parent(s): c15c5da

Adding devcontainer config

Browse files
Files changed (2) hide show
  1. .devcontainer/devcontainer.json +29 -0
  2. app.py +1 -1
.devcontainer/devcontainer.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/python
3
+ {
4
+ "name": "Python 3",
5
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
+ "image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
7
+ "customizations": {
8
+ "vscode": {
9
+ "extensions": [
10
+ "ms-python.mypy-type-checker"
11
+ ]
12
+ }
13
+ }
14
+
15
+ // Features to add to the dev container. More info: https://containers.dev/features.
16
+ // "features": {},
17
+
18
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
19
+ // "forwardPorts": [],
20
+
21
+ // Use 'postCreateCommand' to run commands after the container is created.
22
+ // "postCreateCommand": "pip3 install --user -r requirements.txt",
23
+
24
+ // Configure tool-specific properties.
25
+ // "customizations": {},
26
+
27
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
28
+ // "remoteUser": "root"
29
+ }
app.py CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
4
 
5
  model = pipeline("summarization")
6
 
7
- def predict(prompt):
8
  summary = model(prompt)[0]["summary_text"]
9
  return summary
10
 
 
4
 
5
  model = pipeline("summarization")
6
 
7
+ def predict(prompt: str) -> str:
8
  summary = model(prompt)[0]["summary_text"]
9
  return summary
10