Merge branch 'main' into add-traditional
Browse files- README.md +9 -24
- huggingface.yml +9 -0
README.md
CHANGED
|
@@ -1,27 +1,14 @@
|
|
| 1 |
-
---
|
| 2 |
|
| 3 |
-
title: Chinese Idiom Finder
|
| 4 |
-
emoji: 💬
|
| 5 |
-
colorFrom: yellow
|
| 6 |
-
colorTo: purple
|
| 7 |
-
sdk: gradio
|
| 8 |
-
sdk_version: 5.42.0
|
| 9 |
-
app_file: src/app.py
|
| 10 |
-
pinned: false
|
| 11 |
-
hf_oauth: true
|
| 12 |
-
hf_oauth_scopes:
|
| 13 |
-
- inference-api
|
| 14 |
-
---
|
| 15 |
|
| 16 |
# 🀄 Chinese Idiom Finder
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
|
| 21 |
---
|
| 22 |
|
| 23 |
## ✨ Features
|
| 24 |
-
- 🔍 **Idiom search**
|
| 25 |
- ✅ **Idiom verification** using:
|
| 26 |
- [ChID dataset](https://arxiv.org/abs/1906.01265) (Chinese Idiom Dataset)
|
| 27 |
- CC-CEDICT (open Chinese–English dictionary)
|
|
@@ -30,21 +17,18 @@ Given a situation, the app suggests a relevant idiom, provides **pinyin**, a **l
|
|
| 30 |
---
|
| 31 |
|
| 32 |
## 🚀 How It Works
|
| 33 |
-
1. User inputs a situation (e.g. *“When
|
| 34 |
2. The LLM generates an idiom suggestion.
|
| 35 |
-
3. The idiom is verified against datasets/dictionaries.
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
- Pinyin
|
| 39 |
-
- Literal translation
|
| 40 |
-
- Concise explanation
|
| 41 |
|
| 42 |
---
|
| 43 |
|
| 44 |
## 🛠️ Tech Stack
|
| 45 |
- [Gradio](https://www.gradio.app/) (frontend)
|
| 46 |
- Hugging Face Spaces (deployment)
|
| 47 |
-
-
|
| 48 |
- Python (requests, pypinyin, etc.)
|
| 49 |
|
| 50 |
---
|
|
@@ -58,3 +42,4 @@ git clone https://huggingface.co/spaces/chinese-enthusiasts/idiom-finder
|
|
| 58 |
cd idiom-finder
|
| 59 |
pip install -r requirements.txt
|
| 60 |
python app.py
|
|
|
|
|
|
|
|
|
| 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
# 🀄 Chinese Idiom Finder
|
| 4 |
|
| 5 |
+
A Large Language Model (LLM)-powered interactive app for exploring and learning **Chinese idioms (成语, 俗语, 谚语)**.
|
| 6 |
+
When a user provides a situation in English, the app suggests a relevant idiom, provides **pinyin**, a **literal English translation**, and a **concise explanation**.
|
| 7 |
|
| 8 |
---
|
| 9 |
|
| 10 |
## ✨ Features
|
| 11 |
+
- 🔍 **Idiom search** powered by an LLM (**gpt-oss-120b**) running on Cerebras’s AI inference platform. This model was chosen for its strong performance and availability on the Cerebras Free tier.
|
| 12 |
- ✅ **Idiom verification** using:
|
| 13 |
- [ChID dataset](https://arxiv.org/abs/1906.01265) (Chinese Idiom Dataset)
|
| 14 |
- CC-CEDICT (open Chinese–English dictionary)
|
|
|
|
| 17 |
---
|
| 18 |
|
| 19 |
## 🚀 How It Works
|
| 20 |
+
1. User inputs a situation (e.g. *“When teamwork is important to succeed”*).
|
| 21 |
2. The LLM generates an idiom suggestion.
|
| 22 |
+
3. The idiom is verified against datasets/dictionaries before it's returned.
|
| 23 |
+
|
| 24 |
+

|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
---
|
| 27 |
|
| 28 |
## 🛠️ Tech Stack
|
| 29 |
- [Gradio](https://www.gradio.app/) (frontend)
|
| 30 |
- Hugging Face Spaces (deployment)
|
| 31 |
+
- Cerebras LLM API
|
| 32 |
- Python (requests, pypinyin, etc.)
|
| 33 |
|
| 34 |
---
|
|
|
|
| 42 |
cd idiom-finder
|
| 43 |
pip install -r requirements.txt
|
| 44 |
python app.py
|
| 45 |
+
```
|
huggingface.yml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
title: Chinese Idiom Finder
|
| 3 |
+
emoji: 💬
|
| 4 |
+
colorFrom: yellow
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 5.42.0
|
| 8 |
+
app_file: src/app.py
|
| 9 |
+
pinned: false
|