marquesafonso commited on
Commit
0abce4c
·
1 Parent(s): c7cbbf8

add action to connect to hf space

Browse files
.devcontainer/devcontainer.json DELETED
@@ -1,22 +0,0 @@
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-bookworm"
7
-
8
- // Features to add to the dev container. More info: https://containers.dev/features.
9
- // "features": {},
10
-
11
- // Use 'forwardPorts' to make a list of ports inside the container available locally.
12
- // "forwardPorts": [],
13
-
14
- // Use 'postCreateCommand' to run commands after the container is created.
15
- // "postCreateCommand": "pip3 install --user -r requirements.txt",
16
-
17
- // Configure tool-specific properties.
18
- // "customizations": {},
19
-
20
- // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21
- // "remoteUser": "root"
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.env.example CHANGED
@@ -1,2 +1,4 @@
1
- HF_TOKEN="<your-hf-token>"
2
- HF_SPACE="marquesafonso/multilang-asr-transcriber"
 
 
 
1
+ HF_TOKEN="<yur-hf-token>"
2
+ HF_SPACE="marquesafonso/multilang-asr-transcriber"
3
+ HF_USERNAME="<your-hf-user>"
4
+ SPACE_NAME="<your-hf-space>"
.github/workflows/main.yml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face hub
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ # to run this workflow manually from the Actions tab
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ sync-to-hub:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ with:
14
+ fetch-depth: 0
15
+ lfs: true
16
+ - name: Push to hub
17
+ env:
18
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
19
+ HF_USERNAME: ${{ secrets.HF_USERNAME }}
20
+ SPACE_NAME: ${{ secrets.SPACE_NAME }}
21
+ run: git push https://$HF_USERNAME:[email protected]/spaces/$HF_USERNAME/$SPACE_NAME main
main.py CHANGED
@@ -21,7 +21,7 @@ from cachetools import TTLCache
21
  ## DONE: improve loading spinner. (redirect)
22
  ## DONE: fix tempdir cleanup
23
  ## DONE: add transcription preview component + allow for interactive validation of transcription in-browser.
24
- ## TODO: add word level highlighting option. WIP (word background margins need to be addressed; mobile mode needs work in json mode)
25
  ## TODO: improve UI
26
 
27
  app = FastAPI()
 
21
  ## DONE: improve loading spinner. (redirect)
22
  ## DONE: fix tempdir cleanup
23
  ## DONE: add transcription preview component + allow for interactive validation of transcription in-browser.
24
+ ## TODO: add word level highlighting option. WIP (Avoid caption char overflow by using a max chars heuristic in transcriber)
25
  ## TODO: improve UI
26
 
27
  app = FastAPI()