Spaces:
Running
Running
Merge
Browse files- .gitattributes +35 -35
- .gitignore +92 -92
- .idea/.gitignore +3 -3
- .idea/CaptionProject.iml +9 -9
- .idea/inspectionProfiles/Project_Default.xml +43 -43
- .idea/inspectionProfiles/profiles_settings.xml +5 -5
- .idea/misc.xml +3 -3
- .idea/modules.xml +7 -7
- .idea/vcs.xml +5 -5
- Functions/caption_editor_functions.py +43 -43
- Functions/db_connection.py +10 -10
- Functions/video_player_functions.py +21 -21
- README.md +12 -12
- Resources/captions.jsonl +15 -15
- Resources/css.py +13 -13
.gitattributes
CHANGED
|
@@ -1,35 +1,35 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
.gitignore
CHANGED
|
@@ -1,92 +1,92 @@
|
|
| 1 |
-
# Covers JetBrains IDEs: IntelliJ, GoLand, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
| 2 |
-
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
| 3 |
-
|
| 4 |
-
# User-specific stuff
|
| 5 |
-
.idea/**/workspace.xml
|
| 6 |
-
.idea/**/tasks.xml
|
| 7 |
-
.idea/**/usage.statistics.xml
|
| 8 |
-
.idea/**/dictionaries
|
| 9 |
-
.idea/**/shelf
|
| 10 |
-
|
| 11 |
-
# AWS User-specific
|
| 12 |
-
.idea/**/aws.xml
|
| 13 |
-
|
| 14 |
-
# Generated files
|
| 15 |
-
.idea/**/contentModel.xml
|
| 16 |
-
|
| 17 |
-
# Sensitive or high-churn files
|
| 18 |
-
.idea/**/dataSources/
|
| 19 |
-
.idea/**/dataSources.ids
|
| 20 |
-
.idea/**/dataSources.local.xml
|
| 21 |
-
.idea/**/sqlDataSources.xml
|
| 22 |
-
.idea/**/dynamic.xml
|
| 23 |
-
.idea/**/uiDesigner.xml
|
| 24 |
-
.idea/**/dbnavigator.xml
|
| 25 |
-
|
| 26 |
-
# Gradle
|
| 27 |
-
.idea/**/gradle.xml
|
| 28 |
-
.idea/**/libraries
|
| 29 |
-
|
| 30 |
-
# Gradle and Maven with auto-import
|
| 31 |
-
# When using Gradle or Maven with auto-import, you should exclude module files,
|
| 32 |
-
# since they will be recreated, and may cause churn. Uncomment if using
|
| 33 |
-
# auto-import.
|
| 34 |
-
# .idea/artifacts
|
| 35 |
-
# .idea/compiler.xml
|
| 36 |
-
# .idea/jarRepositories.xml
|
| 37 |
-
# .idea/modules.xml
|
| 38 |
-
# .idea/*.iml
|
| 39 |
-
# .idea/modules
|
| 40 |
-
# *.iml
|
| 41 |
-
# *.ipr
|
| 42 |
-
|
| 43 |
-
# CMake
|
| 44 |
-
cmake-build-*/
|
| 45 |
-
|
| 46 |
-
# Mongo Explorer plugin
|
| 47 |
-
.idea/**/mongoSettings.xml
|
| 48 |
-
|
| 49 |
-
# File-based project format
|
| 50 |
-
*.iws
|
| 51 |
-
|
| 52 |
-
# IntelliJ
|
| 53 |
-
out/
|
| 54 |
-
|
| 55 |
-
# mpeltonen/sbt-idea plugin
|
| 56 |
-
.idea_modules/
|
| 57 |
-
|
| 58 |
-
# JIRA plugin
|
| 59 |
-
atlassian-ide-plugin.xml
|
| 60 |
-
|
| 61 |
-
# Cursive Clojure plugin
|
| 62 |
-
.idea/replstate.xml
|
| 63 |
-
|
| 64 |
-
# SonarLint plugin
|
| 65 |
-
.idea/sonarlint/
|
| 66 |
-
.idea/sonarlint.xml # see https://community.sonarsource.com/t/is-the-file-idea-idea-idea-sonarlint-xml-intended-to-be-under-source-control/121119
|
| 67 |
-
|
| 68 |
-
# Crashlytics plugin (for Android Studio and IntelliJ)
|
| 69 |
-
com_crashlytics_export_strings.xml
|
| 70 |
-
crashlytics.properties
|
| 71 |
-
crashlytics-build.properties
|
| 72 |
-
fabric.properties
|
| 73 |
-
|
| 74 |
-
# Editor-based HTTP Client
|
| 75 |
-
.idea/httpRequests
|
| 76 |
-
http-client.private.env.json
|
| 77 |
-
|
| 78 |
-
# Android studio 3.1+ serialized cache file
|
| 79 |
-
.idea/caches/build_file_checksums.ser
|
| 80 |
-
|
| 81 |
-
# Apifox Helper cache
|
| 82 |
-
.idea/.cache/.Apifox_Helper
|
| 83 |
-
.idea/ApifoxUploaderProjectSetting.xml
|
| 84 |
-
|
| 85 |
-
# Manually added
|
| 86 |
-
Resources/upload.py
|
| 87 |
-
Resources/users.json
|
| 88 |
-
Resources/videos.json
|
| 89 |
-
Resources/captions_backup.jsonl
|
| 90 |
-
Resources/writetoken1.txt
|
| 91 |
-
venv
|
| 92 |
-
**/__pycache__
|
|
|
|
| 1 |
+
# Covers JetBrains IDEs: IntelliJ, GoLand, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
| 2 |
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
| 3 |
+
|
| 4 |
+
# User-specific stuff
|
| 5 |
+
.idea/**/workspace.xml
|
| 6 |
+
.idea/**/tasks.xml
|
| 7 |
+
.idea/**/usage.statistics.xml
|
| 8 |
+
.idea/**/dictionaries
|
| 9 |
+
.idea/**/shelf
|
| 10 |
+
|
| 11 |
+
# AWS User-specific
|
| 12 |
+
.idea/**/aws.xml
|
| 13 |
+
|
| 14 |
+
# Generated files
|
| 15 |
+
.idea/**/contentModel.xml
|
| 16 |
+
|
| 17 |
+
# Sensitive or high-churn files
|
| 18 |
+
.idea/**/dataSources/
|
| 19 |
+
.idea/**/dataSources.ids
|
| 20 |
+
.idea/**/dataSources.local.xml
|
| 21 |
+
.idea/**/sqlDataSources.xml
|
| 22 |
+
.idea/**/dynamic.xml
|
| 23 |
+
.idea/**/uiDesigner.xml
|
| 24 |
+
.idea/**/dbnavigator.xml
|
| 25 |
+
|
| 26 |
+
# Gradle
|
| 27 |
+
.idea/**/gradle.xml
|
| 28 |
+
.idea/**/libraries
|
| 29 |
+
|
| 30 |
+
# Gradle and Maven with auto-import
|
| 31 |
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
| 32 |
+
# since they will be recreated, and may cause churn. Uncomment if using
|
| 33 |
+
# auto-import.
|
| 34 |
+
# .idea/artifacts
|
| 35 |
+
# .idea/compiler.xml
|
| 36 |
+
# .idea/jarRepositories.xml
|
| 37 |
+
# .idea/modules.xml
|
| 38 |
+
# .idea/*.iml
|
| 39 |
+
# .idea/modules
|
| 40 |
+
# *.iml
|
| 41 |
+
# *.ipr
|
| 42 |
+
|
| 43 |
+
# CMake
|
| 44 |
+
cmake-build-*/
|
| 45 |
+
|
| 46 |
+
# Mongo Explorer plugin
|
| 47 |
+
.idea/**/mongoSettings.xml
|
| 48 |
+
|
| 49 |
+
# File-based project format
|
| 50 |
+
*.iws
|
| 51 |
+
|
| 52 |
+
# IntelliJ
|
| 53 |
+
out/
|
| 54 |
+
|
| 55 |
+
# mpeltonen/sbt-idea plugin
|
| 56 |
+
.idea_modules/
|
| 57 |
+
|
| 58 |
+
# JIRA plugin
|
| 59 |
+
atlassian-ide-plugin.xml
|
| 60 |
+
|
| 61 |
+
# Cursive Clojure plugin
|
| 62 |
+
.idea/replstate.xml
|
| 63 |
+
|
| 64 |
+
# SonarLint plugin
|
| 65 |
+
.idea/sonarlint/
|
| 66 |
+
.idea/sonarlint.xml # see https://community.sonarsource.com/t/is-the-file-idea-idea-idea-sonarlint-xml-intended-to-be-under-source-control/121119
|
| 67 |
+
|
| 68 |
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
| 69 |
+
com_crashlytics_export_strings.xml
|
| 70 |
+
crashlytics.properties
|
| 71 |
+
crashlytics-build.properties
|
| 72 |
+
fabric.properties
|
| 73 |
+
|
| 74 |
+
# Editor-based HTTP Client
|
| 75 |
+
.idea/httpRequests
|
| 76 |
+
http-client.private.env.json
|
| 77 |
+
|
| 78 |
+
# Android studio 3.1+ serialized cache file
|
| 79 |
+
.idea/caches/build_file_checksums.ser
|
| 80 |
+
|
| 81 |
+
# Apifox Helper cache
|
| 82 |
+
.idea/.cache/.Apifox_Helper
|
| 83 |
+
.idea/ApifoxUploaderProjectSetting.xml
|
| 84 |
+
|
| 85 |
+
# Manually added
|
| 86 |
+
Resources/upload.py
|
| 87 |
+
Resources/users.json
|
| 88 |
+
Resources/videos.json
|
| 89 |
+
Resources/captions_backup.jsonl
|
| 90 |
+
Resources/writetoken1.txt
|
| 91 |
+
venv
|
| 92 |
+
**/__pycache__
|
.idea/.gitignore
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
# Default ignored files
|
| 2 |
-
/shelf/
|
| 3 |
-
/workspace.xml
|
|
|
|
| 1 |
+
# Default ignored files
|
| 2 |
+
/shelf/
|
| 3 |
+
/workspace.xml
|
.idea/CaptionProject.iml
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
-
<module type="PYTHON_MODULE" version="4">
|
| 3 |
-
<component name="NewModuleRootManager">
|
| 4 |
-
<content url="file://$MODULE_DIR$">
|
| 5 |
-
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
| 6 |
-
</content>
|
| 7 |
-
<orderEntry type="inheritedJdk" />
|
| 8 |
-
<orderEntry type="sourceFolder" forTests="false" />
|
| 9 |
-
</component>
|
| 10 |
</module>
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<module type="PYTHON_MODULE" version="4">
|
| 3 |
+
<component name="NewModuleRootManager">
|
| 4 |
+
<content url="file://$MODULE_DIR$">
|
| 5 |
+
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
| 6 |
+
</content>
|
| 7 |
+
<orderEntry type="inheritedJdk" />
|
| 8 |
+
<orderEntry type="sourceFolder" forTests="false" />
|
| 9 |
+
</component>
|
| 10 |
</module>
|
.idea/inspectionProfiles/Project_Default.xml
CHANGED
|
@@ -1,44 +1,44 @@
|
|
| 1 |
-
<component name="InspectionProjectProfileManager">
|
| 2 |
-
<profile version="1.0">
|
| 3 |
-
<option name="myName" value="Project Default" />
|
| 4 |
-
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
| 5 |
-
<option name="ignoredPackages">
|
| 6 |
-
<value>
|
| 7 |
-
<list size="31">
|
| 8 |
-
<item index="0" class="java.lang.String" itemvalue="httpx" />
|
| 9 |
-
<item index="1" class="java.lang.String" itemvalue="python-dateutil" />
|
| 10 |
-
<item index="2" class="java.lang.String" itemvalue="python-dotenv" />
|
| 11 |
-
<item index="3" class="java.lang.String" itemvalue="h11" />
|
| 12 |
-
<item index="4" class="java.lang.String" itemvalue="MarkupSafe" />
|
| 13 |
-
<item index="5" class="java.lang.String" itemvalue="requests" />
|
| 14 |
-
<item index="6" class="java.lang.String" itemvalue="Jinja2" />
|
| 15 |
-
<item index="7" class="java.lang.String" itemvalue="sniffio" />
|
| 16 |
-
<item index="8" class="java.lang.String" itemvalue="typing-inspection" />
|
| 17 |
-
<item index="9" class="java.lang.String" itemvalue="exceptiongroup" />
|
| 18 |
-
<item index="10" class="java.lang.String" itemvalue="eval_type_backport" />
|
| 19 |
-
<item index="11" class="java.lang.String" itemvalue="zipp" />
|
| 20 |
-
<item index="12" class="java.lang.String" itemvalue="certifi" />
|
| 21 |
-
<item index="13" class="java.lang.String" itemvalue="anyio" />
|
| 22 |
-
<item index="14" class="java.lang.String" itemvalue="urllib3" />
|
| 23 |
-
<item index="15" class="java.lang.String" itemvalue="itsdangerous" />
|
| 24 |
-
<item index="16" class="java.lang.String" itemvalue="Flask" />
|
| 25 |
-
<item index="17" class="java.lang.String" itemvalue="blinker" />
|
| 26 |
-
<item index="18" class="java.lang.String" itemvalue="annotated-types" />
|
| 27 |
-
<item index="19" class="java.lang.String" itemvalue="importlib_metadata" />
|
| 28 |
-
<item index="20" class="java.lang.String" itemvalue="pydantic" />
|
| 29 |
-
<item index="21" class="java.lang.String" itemvalue="six" />
|
| 30 |
-
<item index="22" class="java.lang.String" itemvalue="Werkzeug" />
|
| 31 |
-
<item index="23" class="java.lang.String" itemvalue="click" />
|
| 32 |
-
<item index="24" class="java.lang.String" itemvalue="pydantic_core" />
|
| 33 |
-
<item index="25" class="java.lang.String" itemvalue="colorama" />
|
| 34 |
-
<item index="26" class="java.lang.String" itemvalue="typing_extensions" />
|
| 35 |
-
<item index="27" class="java.lang.String" itemvalue="charset-normalizer" />
|
| 36 |
-
<item index="28" class="java.lang.String" itemvalue="mistralai" />
|
| 37 |
-
<item index="29" class="java.lang.String" itemvalue="httpcore" />
|
| 38 |
-
<item index="30" class="java.lang.String" itemvalue="idna" />
|
| 39 |
-
</list>
|
| 40 |
-
</value>
|
| 41 |
-
</option>
|
| 42 |
-
</inspection_tool>
|
| 43 |
-
</profile>
|
| 44 |
</component>
|
|
|
|
| 1 |
+
<component name="InspectionProjectProfileManager">
|
| 2 |
+
<profile version="1.0">
|
| 3 |
+
<option name="myName" value="Project Default" />
|
| 4 |
+
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
| 5 |
+
<option name="ignoredPackages">
|
| 6 |
+
<value>
|
| 7 |
+
<list size="31">
|
| 8 |
+
<item index="0" class="java.lang.String" itemvalue="httpx" />
|
| 9 |
+
<item index="1" class="java.lang.String" itemvalue="python-dateutil" />
|
| 10 |
+
<item index="2" class="java.lang.String" itemvalue="python-dotenv" />
|
| 11 |
+
<item index="3" class="java.lang.String" itemvalue="h11" />
|
| 12 |
+
<item index="4" class="java.lang.String" itemvalue="MarkupSafe" />
|
| 13 |
+
<item index="5" class="java.lang.String" itemvalue="requests" />
|
| 14 |
+
<item index="6" class="java.lang.String" itemvalue="Jinja2" />
|
| 15 |
+
<item index="7" class="java.lang.String" itemvalue="sniffio" />
|
| 16 |
+
<item index="8" class="java.lang.String" itemvalue="typing-inspection" />
|
| 17 |
+
<item index="9" class="java.lang.String" itemvalue="exceptiongroup" />
|
| 18 |
+
<item index="10" class="java.lang.String" itemvalue="eval_type_backport" />
|
| 19 |
+
<item index="11" class="java.lang.String" itemvalue="zipp" />
|
| 20 |
+
<item index="12" class="java.lang.String" itemvalue="certifi" />
|
| 21 |
+
<item index="13" class="java.lang.String" itemvalue="anyio" />
|
| 22 |
+
<item index="14" class="java.lang.String" itemvalue="urllib3" />
|
| 23 |
+
<item index="15" class="java.lang.String" itemvalue="itsdangerous" />
|
| 24 |
+
<item index="16" class="java.lang.String" itemvalue="Flask" />
|
| 25 |
+
<item index="17" class="java.lang.String" itemvalue="blinker" />
|
| 26 |
+
<item index="18" class="java.lang.String" itemvalue="annotated-types" />
|
| 27 |
+
<item index="19" class="java.lang.String" itemvalue="importlib_metadata" />
|
| 28 |
+
<item index="20" class="java.lang.String" itemvalue="pydantic" />
|
| 29 |
+
<item index="21" class="java.lang.String" itemvalue="six" />
|
| 30 |
+
<item index="22" class="java.lang.String" itemvalue="Werkzeug" />
|
| 31 |
+
<item index="23" class="java.lang.String" itemvalue="click" />
|
| 32 |
+
<item index="24" class="java.lang.String" itemvalue="pydantic_core" />
|
| 33 |
+
<item index="25" class="java.lang.String" itemvalue="colorama" />
|
| 34 |
+
<item index="26" class="java.lang.String" itemvalue="typing_extensions" />
|
| 35 |
+
<item index="27" class="java.lang.String" itemvalue="charset-normalizer" />
|
| 36 |
+
<item index="28" class="java.lang.String" itemvalue="mistralai" />
|
| 37 |
+
<item index="29" class="java.lang.String" itemvalue="httpcore" />
|
| 38 |
+
<item index="30" class="java.lang.String" itemvalue="idna" />
|
| 39 |
+
</list>
|
| 40 |
+
</value>
|
| 41 |
+
</option>
|
| 42 |
+
</inspection_tool>
|
| 43 |
+
</profile>
|
| 44 |
</component>
|
.idea/inspectionProfiles/profiles_settings.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
<component name="InspectionProjectProfileManager">
|
| 2 |
-
<settings>
|
| 3 |
-
<option name="USE_PROJECT_PROFILE" value="false" />
|
| 4 |
-
<version value="1.0" />
|
| 5 |
-
</settings>
|
| 6 |
</component>
|
|
|
|
| 1 |
+
<component name="InspectionProjectProfileManager">
|
| 2 |
+
<settings>
|
| 3 |
+
<option name="USE_PROJECT_PROFILE" value="false" />
|
| 4 |
+
<version value="1.0" />
|
| 5 |
+
</settings>
|
| 6 |
</component>
|
.idea/misc.xml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
-
<project version="4">
|
| 3 |
-
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (CaptionProject)" project-jdk-type="Python SDK" />
|
| 4 |
</project>
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (CaptionProject)" project-jdk-type="Python SDK" />
|
| 4 |
</project>
|
.idea/modules.xml
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
-
<project version="4">
|
| 3 |
-
<component name="ProjectModuleManager">
|
| 4 |
-
<modules>
|
| 5 |
-
<module fileurl="file://$PROJECT_DIR$/.idea/CaptionProject.iml" filepath="$PROJECT_DIR$/.idea/CaptionProject.iml" />
|
| 6 |
-
</modules>
|
| 7 |
-
</component>
|
| 8 |
</project>
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="ProjectModuleManager">
|
| 4 |
+
<modules>
|
| 5 |
+
<module fileurl="file://$PROJECT_DIR$/.idea/CaptionProject.iml" filepath="$PROJECT_DIR$/.idea/CaptionProject.iml" />
|
| 6 |
+
</modules>
|
| 7 |
+
</component>
|
| 8 |
</project>
|
.idea/vcs.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
-
<project version="4">
|
| 3 |
-
<component name="VcsDirectoryMappings">
|
| 4 |
-
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
| 5 |
-
</component>
|
| 6 |
</project>
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="VcsDirectoryMappings">
|
| 4 |
+
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
| 5 |
+
</component>
|
| 6 |
</project>
|
Functions/caption_editor_functions.py
CHANGED
|
@@ -1,43 +1,43 @@
|
|
| 1 |
-
import pandas as pd
|
| 2 |
-
import json
|
| 3 |
-
|
| 4 |
-
FILE_PATH = "Resources/captions.jsonl"
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
def get_captions_by_video_id(video_id):
|
| 8 |
-
with open(FILE_PATH) as file:
|
| 9 |
-
captions = pd.read_json(file, lines=True)
|
| 10 |
-
|
| 11 |
-
captions_edit = captions[captions['file'] == video_id]
|
| 12 |
-
captions_edit = captions_edit[['start_time', 'text', 'end_time']]
|
| 13 |
-
captions_edit.columns = ["Start", "Text", "End"]
|
| 14 |
-
return captions_edit
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
def save_dataframe(df, video_id, user):
|
| 18 |
-
cols = ["clean_text", "start_time", "user_id", "signer", "file", "end_time", "url", "text"]
|
| 19 |
-
other_captions_data = []
|
| 20 |
-
new_captions_data = []
|
| 21 |
-
|
| 22 |
-
with open(FILE_PATH) as f:
|
| 23 |
-
for line in f:
|
| 24 |
-
caption = json.loads(line)
|
| 25 |
-
if caption['file'] == video_id:
|
| 26 |
-
new_captions_data.append(caption)
|
| 27 |
-
else:
|
| 28 |
-
other_captions_data.append(caption)
|
| 29 |
-
|
| 30 |
-
other_captions = pd.DataFrame(data=other_captions_data, columns=cols)
|
| 31 |
-
new_captions = pd.DataFrame(data=new_captions_data, columns=cols)
|
| 32 |
-
try:
|
| 33 |
-
new_captions['start_time'] = df['Start'].apply(lambda x: float(x))
|
| 34 |
-
new_captions['text'] = df['Text']
|
| 35 |
-
new_captions['end_time'] = df['End'].apply(lambda x: float(x))
|
| 36 |
-
new_captions['user_id'] = user
|
| 37 |
-
|
| 38 |
-
all_captions = pd.concat([other_captions, new_captions], ignore_index=True)
|
| 39 |
-
|
| 40 |
-
all_captions.to_json(FILE_PATH, orient='records', lines=True)
|
| 41 |
-
return "Save successful!"
|
| 42 |
-
except ValueError:
|
| 43 |
-
return "Save failed: Incorrect input format"
|
|
|
|
| 1 |
+
import pandas as pd
|
| 2 |
+
import json
|
| 3 |
+
|
| 4 |
+
FILE_PATH = "Resources/captions.jsonl"
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def get_captions_by_video_id(video_id):
|
| 8 |
+
with open(FILE_PATH) as file:
|
| 9 |
+
captions = pd.read_json(file, lines=True)
|
| 10 |
+
|
| 11 |
+
captions_edit = captions[captions['file'] == video_id]
|
| 12 |
+
captions_edit = captions_edit[['start_time', 'text', 'end_time']]
|
| 13 |
+
captions_edit.columns = ["Start", "Text", "End"]
|
| 14 |
+
return captions_edit
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
def save_dataframe(df, video_id, user):
|
| 18 |
+
cols = ["clean_text", "start_time", "user_id", "signer", "file", "end_time", "url", "text"]
|
| 19 |
+
other_captions_data = []
|
| 20 |
+
new_captions_data = []
|
| 21 |
+
|
| 22 |
+
with open(FILE_PATH) as f:
|
| 23 |
+
for line in f:
|
| 24 |
+
caption = json.loads(line)
|
| 25 |
+
if caption['file'] == video_id:
|
| 26 |
+
new_captions_data.append(caption)
|
| 27 |
+
else:
|
| 28 |
+
other_captions_data.append(caption)
|
| 29 |
+
|
| 30 |
+
other_captions = pd.DataFrame(data=other_captions_data, columns=cols)
|
| 31 |
+
new_captions = pd.DataFrame(data=new_captions_data, columns=cols)
|
| 32 |
+
try:
|
| 33 |
+
new_captions['start_time'] = df['Start'].apply(lambda x: float(x))
|
| 34 |
+
new_captions['text'] = df['Text']
|
| 35 |
+
new_captions['end_time'] = df['End'].apply(lambda x: float(x))
|
| 36 |
+
new_captions['user_id'] = user
|
| 37 |
+
|
| 38 |
+
all_captions = pd.concat([other_captions, new_captions], ignore_index=True)
|
| 39 |
+
|
| 40 |
+
all_captions.to_json(FILE_PATH, orient='records', lines=True)
|
| 41 |
+
return "Save successful!"
|
| 42 |
+
except ValueError:
|
| 43 |
+
return "Save failed: Incorrect input format"
|
Functions/db_connection.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
-
import firebase_admin
|
| 2 |
-
from firebase_admin import db
|
| 3 |
-
|
| 4 |
-
KEY_PATH = 'Resources/key.json'
|
| 5 |
-
|
| 6 |
-
cred_obj = firebase_admin.credentials.Certificate(KEY_PATH)
|
| 7 |
-
default_app = firebase_admin.initialize_app(cred_obj, {
|
| 8 |
-
'databaseURL': "https://video-link-db-default-rtdb.europe-west1.firebasedatabase.app/"
|
| 9 |
-
})
|
| 10 |
-
videos_ref = db.reference("/Videos")
|
|
|
|
| 1 |
+
import firebase_admin
|
| 2 |
+
from firebase_admin import db
|
| 3 |
+
|
| 4 |
+
KEY_PATH = 'Resources/key.json'
|
| 5 |
+
|
| 6 |
+
cred_obj = firebase_admin.credentials.Certificate(KEY_PATH)
|
| 7 |
+
default_app = firebase_admin.initialize_app(cred_obj, {
|
| 8 |
+
'databaseURL': "https://video-link-db-default-rtdb.europe-west1.firebasedatabase.app/"
|
| 9 |
+
})
|
| 10 |
+
videos_ref = db.reference("/Videos")
|
Functions/video_player_functions.py
CHANGED
|
@@ -1,21 +1,21 @@
|
|
| 1 |
-
import re
|
| 2 |
-
from Functions.db_connection import videos_ref
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
def youtube_link_to_id(link):
|
| 6 |
-
video_id = re.findall("=(.*?)&", link)
|
| 7 |
-
if len(video_id) == 0:
|
| 8 |
-
video_id = re.findall("=(.*)", link)
|
| 9 |
-
return video_id[0]
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
def get_video_embed_by_id(video_id):
|
| 13 |
-
return f"""
|
| 14 |
-
<div class="container">
|
| 15 |
-
<iframe src="https://www.youtube.com/embed/{video_id}" frameborder="0" allowfullscreen class="video"></iframe>
|
| 16 |
-
</div>"""
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
def get_video_link_by_pointer(pointer):
|
| 20 |
-
video_link = videos_ref.child(str(pointer)).get()
|
| 21 |
-
return video_link
|
|
|
|
| 1 |
+
import re
|
| 2 |
+
from Functions.db_connection import videos_ref
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
def youtube_link_to_id(link):
|
| 6 |
+
video_id = re.findall("=(.*?)&", link)
|
| 7 |
+
if len(video_id) == 0:
|
| 8 |
+
video_id = re.findall("=(.*)", link)
|
| 9 |
+
return video_id[0]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def get_video_embed_by_id(video_id):
|
| 13 |
+
return f"""
|
| 14 |
+
<div class="container">
|
| 15 |
+
<iframe src="https://www.youtube.com/embed/{video_id}" frameborder="0" allowfullscreen class="video"></iframe>
|
| 16 |
+
</div>"""
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def get_video_link_by_pointer(pointer):
|
| 20 |
+
video_link = videos_ref.child(str(pointer)).get()
|
| 21 |
+
return video_link
|
README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: CaptionEditor
|
| 3 |
-
emoji: 🌖
|
| 4 |
-
colorFrom: blue
|
| 5 |
-
colorTo: red
|
| 6 |
-
sdk: gradio
|
| 7 |
-
sdk_version: 5.49.1
|
| 8 |
-
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
-
---
|
| 11 |
-
|
| 12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: CaptionEditor
|
| 3 |
+
emoji: 🌖
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: red
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 5.49.1
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
Resources/captions.jsonl
CHANGED
|
@@ -1,15 +1,15 @@
|
|
| 1 |
-
{"clean_text":"one","start_time":1.5,"user_id":"a","signer":40,"file":"Y4stD_ypaAI","end_time":1.6,"url":"www.youtube.com\/watch?v=Y4stD_ypaAI","text":"one"}
|
| 2 |
-
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 3 |
-
{"clean_text":"test","start_time":1.5,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.6,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test 2"}
|
| 4 |
-
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 5 |
-
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 6 |
-
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 7 |
-
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 8 |
-
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 9 |
-
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 10 |
-
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 11 |
-
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 12 |
-
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 13 |
-
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 14 |
-
{"clean_text":"measure","start_time":1.0,"user_id":"admin","signer":20,"file":"tkMg8g8vVUo","end_time":1.435,"url":"www.youtube.com\/watch?v=tkMg8g8vVUo","text":"test"}
|
| 15 |
-
{"clean_text":"apple","start_time":1.71,"user_id":"admin","signer":20,"file":"tkMg8g8vVUo","end_time":2.0,"url":"www.youtube.com\/watch?v=tkMg8g8vVUo","text":"apple"}
|
|
|
|
| 1 |
+
{"clean_text":"one","start_time":1.5,"user_id":"a","signer":40,"file":"Y4stD_ypaAI","end_time":1.6,"url":"www.youtube.com\/watch?v=Y4stD_ypaAI","text":"one"}
|
| 2 |
+
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 3 |
+
{"clean_text":"test","start_time":1.5,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.6,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test 2"}
|
| 4 |
+
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 5 |
+
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 6 |
+
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 7 |
+
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 8 |
+
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 9 |
+
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 10 |
+
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 11 |
+
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 12 |
+
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 13 |
+
{"clean_text":"test","start_time":0.0,"user_id":"admin","signer":39,"file":"1pXUgdCnVec","end_time":1.435,"url":"www.youtube.com\/watch?v=1pXUgdCnVec","text":"test"}
|
| 14 |
+
{"clean_text":"measure","start_time":1.0,"user_id":"admin","signer":20,"file":"tkMg8g8vVUo","end_time":1.435,"url":"www.youtube.com\/watch?v=tkMg8g8vVUo","text":"test"}
|
| 15 |
+
{"clean_text":"apple","start_time":1.71,"user_id":"admin","signer":20,"file":"tkMg8g8vVUo","end_time":2.0,"url":"www.youtube.com\/watch?v=tkMg8g8vVUo","text":"apple"}
|
Resources/css.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
-
css = """
|
| 2 |
-
.container {
|
| 3 |
-
position: relative;
|
| 4 |
-
width: 100%;
|
| 5 |
-
height: 0;
|
| 6 |
-
padding-bottom: 56.25%;
|
| 7 |
-
}
|
| 8 |
-
.video {
|
| 9 |
-
position: absolute;
|
| 10 |
-
top: 0;
|
| 11 |
-
left: 0;
|
| 12 |
-
width: 100%;
|
| 13 |
-
height: 100%;
|
| 14 |
}"""
|
|
|
|
| 1 |
+
css = """
|
| 2 |
+
.container {
|
| 3 |
+
position: relative;
|
| 4 |
+
width: 100%;
|
| 5 |
+
height: 0;
|
| 6 |
+
padding-bottom: 56.25%;
|
| 7 |
+
}
|
| 8 |
+
.video {
|
| 9 |
+
position: absolute;
|
| 10 |
+
top: 0;
|
| 11 |
+
left: 0;
|
| 12 |
+
width: 100%;
|
| 13 |
+
height: 100%;
|
| 14 |
}"""
|