Luigi commited on
Commit
9cf2f4a
·
1 Parent(s): 4991207

update requirements.txt & README.md

Browse files
Files changed (2) hide show
  1. README.md +75 -7
  2. requirements.txt +1 -5
README.md CHANGED
@@ -1,14 +1,82 @@
1
  ---
2
  title: Dinercall Intent Demo
3
- emoji: 📊
4
- colorFrom: purple
5
- colorTo: green
6
- sdk: streamlit
7
- sdk_version: 1.44.1
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
11
- short_description: A diner restaurant intent detector
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: Dinercall Intent Demo
3
+ emoji: 🏆
4
+ colorFrom: red
5
+ colorTo: gray
6
+ sdk: gradio
7
+ sdk_version: 5.23.3
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
11
+ short_description: restaurant reservation intent detector
12
  ---
13
 
14
+ Absolutely! Here's a full **`README.md`** tailored for your Hugging Face **Streamlit Space**, which features:
15
+
16
+ - Voice recording via mic
17
+ - Transcription using `Jingmiao/whisper-small-zh_tw`
18
+ - Reservation intent classification via ALBERT models
19
+
20
+ ---
21
+
22
+ ### 📄 `README.md`
23
+
24
+ ```markdown
25
+ # 🍽️ 餐廳訂位意圖識別系統 (Mandarin Reservation Intent Classifier)
26
+
27
+ 🎙️ 本系統讓使用者可以透過**語音錄音**或**文字輸入**,自動判斷是否具有「訂位意圖」,是語音助理或自動客服前端的理想元件之一。
28
+
29
+ ---
30
+
31
+ ## 🔍 功能介紹
32
+
33
+ - 🧠 **語音辨識**:使用 fine-tuned Whisper 模型 [`Jingmiao/whisper-small-zh_tw`](https://huggingface.co/Jingmiao/whisper-small-zh_tw) 將語音轉為繁體中文文字。
34
+ - 🤖 **意圖分類**:使用微調的 ALBERT 中文模型判斷輸入是否包含訂位意圖。
35
+ - 📱 **支援手機與桌機**:介面具備良好響應性,適用於各類瀏覽器與行動裝置。
36
+ - 🔊 **瀏覽器錄音**:可直接錄音並即時進行語音辨識與意圖分類。
37
+
38
+ ---
39
+
40
+ ## 🚀 使用方式
41
+
42
+ 1. 點擊「▶️ 開始錄音」按鈕開始說話。
43
+ 2. 點擊「⏹️ 停止錄音」完成語音輸入。
44
+ 3. 系統會自動轉文字,並進行「是否為訂位」意圖判斷。
45
+ 4. 或者也可以直接手動輸入文字,再點擊送出按鈕。
46
+
47
+ ---
48
+
49
+ ## 🤗 使用模型
50
+
51
+ ### Whisper 語音辨識:
52
+ - [`Jingmiao/whisper-small-zh_tw`](https://huggingface.co/Jingmiao/whisper-small-zh_tw)
53
+
54
+ ### 中文意圖分類模型:
55
+ - [`Luigi/albert-tiny-chinese-dinercall-intent`](https://huggingface.co/Luigi/albert-tiny-chinese-dinercall-intent)
56
+ - [`Luigi/albert-base-chinese-dinercall-intent`](https://huggingface.co/Luigi/albert-base-chinese-dinercall-intent)
57
+
58
+ ---
59
+
60
+ ## 📦 依賴環境
61
+
62
+ ```txt
63
+ streamlit
64
+ transformers>=4.30.0
65
+ torch
66
+ torchaudio
67
+ ```
68
+
69
+ ---
70
+
71
+ ## 🛠️ 開發者備註
72
+
73
+ - 本應用為 Streamlit App,支援 Hugging Face Spaces 部署。
74
+ - 使用 JavaScript 客製化錄音介面,透過 Web Audio API 進行錄音與 POST 回傳。
75
+ - 若需延伸本系統至其他語言或多輪對話,歡迎 fork 本專案進行改造!
76
+
77
+ ---
78
+
79
+ © 2024 by [Your Name or Team]. Made with ❤️ using Hugging Face + Streamlit.
80
+ ```
81
+
82
+ ---
requirements.txt CHANGED
@@ -1,8 +1,4 @@
1
- sentencepiece
2
  transformers>=4.30.0
3
  torch
4
- gradio
5
- safetensors
6
- huggingface_hub
7
  torchaudio
8
- gradio>=3.30.0
 
1
+ streamlit
2
  transformers>=4.30.0
3
  torch
 
 
 
4
  torchaudio