dinercall-ner-gemma / README.md
Luigi's picture
initial commit
3d2b701

A newer version of the Gradio SDK is available: 5.49.1

Upgrade
metadata
title: Dinercall Ner Gemma
emoji: 👁
colorFrom: blue
colorTo: gray
sdk: gradio
sdk_version: 5.44.1
app_file: app.py
pinned: false
license: apache-2.0
short_description: NER for Diner Restaurant Reservation with Gemma 3 270m it

🍽️ 餐廳訂位資訊提取器

一個基於AI的訂位資訊提取工具,專門用於從中文訊息中自動提取餐廳訂位資訊。

功能特色

  • 🔍 自動從中文訊息提取訂位資訊
  • 📋 輸出結構化的JSON格式
  • 🎯 高準確率的資訊提取
  • 💻 完全基於CPU運行,無需GPU
  • 🎨 現代化的 Gradio v5 界面

提取資訊

  • 👥 人數 (num_people)
  • 📅 預訂日期/時間 (reservation_date)
  • 📞 電話號碼 (phone_num)

使用示例

輸入: "你好,我想訂明天晚上7點的位子,四位成人,電話是0912-345-678"

輸出:

{
  "num_people": "4",
  "reservation_date": "明天晚上7點",
  "phone_num": "0912-345-678"
}

技術細節

  • 模型: Luigi/gemma-3-270m-it-dinercall-ner (基於 Gemma-3-270M 微調)
  • 框架: Gradio v5 + Transformers
  • 部署: Hugging Face Spaces (CPU)

本地運行

pip install -r requirements.txt
python src/app.py

作者

Together AI 提供技術支持


## Key Features of This Gradio v5 Solution:

1. **Modern UI**: Uses Gradio v5's enhanced styling capabilities
2. **Interactive Examples**: Clickable examples that automatically populate the input field
3. **Dual Output Display**: Shows both structured JSON and raw model output
4. **Statistics Panel**: Displays extracted information in an easy-to-read format
5. **Custom CSS**: Enhanced styling with gradients and hover effects
6. **Responsive Design**: Works well on both desktop and mobile devices
7. **JavaScript Integration**: For smoother interaction with example clicks

## Deployment Instructions:

1. **Create a new Space** on Hugging Face:
   - Go to https://huggingface.co/spaces
   - Click "Create new Space"
   - Select "Gradio" as SDK
   - Name: `dinercall-ner-demo`
   - Visibility: Public

2. **Upload all files** to your Space

3. **The Space will automatically build** and be available at:
   `https://huggingface.co/spaces/your-username/dinercall-ner-demo`

This Gradio v5 solution provides a modern, feature-rich interface for your NER model that will work reliably on Hugging Face Spaces without permission issues. The interface is user-friendly and provides all the functionality you need for testing your model.