Spaces:
Running
on
Zero
Running
on
Zero
[refactor] README.md のリンク更新と app.py への機能追加
Browse filesプロジェクトのドキュメントとコードの重要な更新を行いました。具体的な変更内容は以下の通りです:
### README.md のリンク変更
- Hugging Face Spaces のリンクを更新しました。`Sunwood-ai-labs/KotobaTranscriber` から `MakiAi/KotobaTranscriber` への変更を行い、最新のプロジェクトホスト先に対応しました。
- このリンク変更により、利用者が最新のデモページにアクセスできるようになります。
### app.py の機能強化
- `spaces` モジュールをインポートし、新たに `@spaces.GPU(duration=120)` デコレータを追加しました。これにより、GPU リソースの利用時間を指定し、効率的なリソース管理が可能になります。
- `transcribe` 関数が GPU を使用してより高速に動作するようになり、音声認識のパフォーマンスが向上します。
これらの変更により、プロジェクトのアクセス性が向上し、バックエンドの処理効率も改善されました。
README.md
CHANGED
|
@@ -14,7 +14,7 @@ pinned: false
|
|
| 14 |
<br>
|
| 15 |
<h1 align="center">KotobaTranscriber
|
| 16 |
|
| 17 |
-
[](https://huggingface.co/spaces/
|
| 18 |
[](https://github.com/KotobaTranscriber/Sunwood-ai-labs "Go to GitHub repo")
|
| 19 |
[](https://github.com/KotobaTranscriber/Sunwood-ai-labs)
|
| 20 |
[](https://github.com/KotobaTranscriber/Sunwood-ai-labs)
|
|
@@ -42,7 +42,7 @@ KotobaTranscriber は、日本語音声をテキストに変換するための
|
|
| 42 |
|
| 43 |
KotobaTranscriber のデモアプリケーションを Hugging Face Spaces で公開しています。ぜひ、実際に体験してみてください。
|
| 44 |
|
| 45 |
-
[](https://huggingface.co/spaces/
|
| 46 |
|
| 47 |
## Getting Started
|
| 48 |
|
|
|
|
| 14 |
<br>
|
| 15 |
<h1 align="center">KotobaTranscriber
|
| 16 |
|
| 17 |
+
[](https://huggingface.co/spaces/MakiAi/KotobaTranscriber)
|
| 18 |
[](https://github.com/KotobaTranscriber/Sunwood-ai-labs "Go to GitHub repo")
|
| 19 |
[](https://github.com/KotobaTranscriber/Sunwood-ai-labs)
|
| 20 |
[](https://github.com/KotobaTranscriber/Sunwood-ai-labs)
|
|
|
|
| 42 |
|
| 43 |
KotobaTranscriber のデモアプリケーションを Hugging Face Spaces で公開しています。ぜひ、実際に体験してみてください。
|
| 44 |
|
| 45 |
+
[](https://huggingface.co/spaces/MakiAi/KotobaTranscriber)
|
| 46 |
|
| 47 |
## Getting Started
|
| 48 |
|
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
from transformers import pipeline
|
|
@@ -19,6 +20,7 @@ pipe = pipeline(
|
|
| 19 |
model_kwargs=model_kwargs
|
| 20 |
)
|
| 21 |
|
|
|
|
| 22 |
# 文字起こし関数
|
| 23 |
def transcribe(audio_file):
|
| 24 |
# 音声の読み込み
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import gradio as gr
|
| 3 |
import torch
|
| 4 |
from transformers import pipeline
|
|
|
|
| 20 |
model_kwargs=model_kwargs
|
| 21 |
)
|
| 22 |
|
| 23 |
+
@spaces.GPU(duration=120)
|
| 24 |
# 文字起こし関数
|
| 25 |
def transcribe(audio_file):
|
| 26 |
# 音声の読み込み
|