MakiAi commited on
Commit
d026c41
1 Parent(s): 60f4497

[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 を使用してより高速に動作するようになり、音声認識のパフォーマンスが向上します。

これらの変更により、プロジェクトのアクセス性が向上し、バックエンドの処理効率も改善されました。

Files changed (2) hide show
  1. README.md +2 -2
  2. app.py +2 -0
README.md CHANGED
@@ -14,7 +14,7 @@ pinned: false
14
  <br>
15
  <h1 align="center">KotobaTranscriber
16
 
17
- [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/Sunwood-ai-labs/KotobaTranscriber)
18
  [![KotobaTranscriber - Sunwood-ai-labs](https://img.shields.io/static/v1?label=KotobaTranscriber&message=Sunwood-ai-labs&color=blue&logo=github)](https://github.com/KotobaTranscriber/Sunwood-ai-labs "Go to GitHub repo")
19
  [![stars - Sunwood-ai-labs](https://img.shields.io/github/stars/KotobaTranscriber/Sunwood-ai-labs?style=social)](https://github.com/KotobaTranscriber/Sunwood-ai-labs)
20
  [![forks - Sunwood-ai-labs](https://img.shields.io/github/forks/KotobaTranscriber/Sunwood-ai-labs?style=social)](https://github.com/KotobaTranscriber/Sunwood-ai-labs)
@@ -42,7 +42,7 @@ KotobaTranscriber は、日本語音声をテキストに変換するための
42
 
43
  KotobaTranscriber のデモアプリケーションを Hugging Face Spaces で公開しています。ぜひ、実際に体験してみてください。
44
 
45
- [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/Sunwood-ai-labs/KotobaTranscriber)
46
 
47
  ## Getting Started
48
 
 
14
  <br>
15
  <h1 align="center">KotobaTranscriber
16
 
17
+ [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/MakiAi/KotobaTranscriber)
18
  [![KotobaTranscriber - Sunwood-ai-labs](https://img.shields.io/static/v1?label=KotobaTranscriber&message=Sunwood-ai-labs&color=blue&logo=github)](https://github.com/KotobaTranscriber/Sunwood-ai-labs "Go to GitHub repo")
19
  [![stars - Sunwood-ai-labs](https://img.shields.io/github/stars/KotobaTranscriber/Sunwood-ai-labs?style=social)](https://github.com/KotobaTranscriber/Sunwood-ai-labs)
20
  [![forks - Sunwood-ai-labs](https://img.shields.io/github/forks/KotobaTranscriber/Sunwood-ai-labs?style=social)](https://github.com/KotobaTranscriber/Sunwood-ai-labs)
 
42
 
43
  KotobaTranscriber のデモアプリケーションを Hugging Face Spaces で公開しています。ぜひ、実際に体験してみてください。
44
 
45
+ [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](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
  # 音声の読み込み