James Espichan Vilca commited on
Commit
1091b7f
1 Parent(s): ade3ee1

fixing branch

Browse files
Files changed (4) hide show
  1. .github/workflows/ci.yml +1 -1
  2. Makefile +14 -0
  3. app.py +15 -0
  4. requirements.txt +3 -0
.github/workflows/ci.yml CHANGED
@@ -20,4 +20,4 @@ jobs:
20
  - name: Push to hub
21
  env:
22
  HF: ${{ secrets.HF }}
23
- run: git push --force https://jamesev1502:$HF@huggingface.co/spaces/noahgift/hugging-face-demo-ml main
 
20
  - name: Push to hub
21
  env:
22
  HF: ${{ secrets.HF }}
23
+ run: git push --force https://jamesev1502:$HF@huggingface.co/spaces/jamesev1502/hugging-face-demo-ml main
Makefile ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ install:
2
+ pip install --upgrade pip &&\
3
+ pip install -r requirements.txt
4
+
5
+ test:
6
+ python -m pytest -vv --cov=hello test_hello.py
7
+
8
+ format:
9
+ black *.py
10
+
11
+ lint:
12
+ pylint --disable=R,C hello.py
13
+
14
+ all: install lint test format
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+ import gradio as gr
3
+
4
+
5
+ model = pipeline("summarization")
6
+
7
+ def predict(prompt):
8
+ summary = model(prompt)[0]["summary_text"]
9
+ return summary
10
+
11
+
12
+ # create an interface for the model
13
+ with gr.Interface(predict, "textbox", "text") as interface:
14
+ interface.launch()
15
+
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio
2
+ transformers
3
+ tensorflow