CoolFace
Apppublic

juliensimon/table_questions

sourceHugging Faceupdated 6mo agoView on Hugging Face
10likes
App README

Table Questions

Ask natural language questions about your CSV data and get answers from two state-of-the-art table question-answering models side by side.

<p align="center"> <img src="https://img.shields.io/badge/TAPEX-Microsoft-blue" alt="TAPEX"> <img src="https://img.shields.io/badge/TAPAS-Google-red" alt="TAPAS"> <img src="https://img.shields.io/badge/SDK-Gradio-orange" alt="Gradio"> </p>

How It Works

  1. 1.Upload a CSV file (or use the default football statistics dataset)
  2. 2.Type a natural language question (e.g., "Who scored the most goals?")
  3. 3.Adjust the row slider to control how many rows the models process
  4. 4.Get answers from both models simultaneously for comparison

Models

ModelProviderArchitectureTraining Data
TAPEX LargeMicrosoftSeq2Seq (BART-based)WikiTableQuestions
TAPAS LargeGoogleBERT-based Table QAWikiTableQuestions

Example Questions

Using the included football statistics dataset:

  • "Who scored the most goals?"
  • "Which team had the fewest losses?"
  • "What was the total number of draws?"

Limitations

  • Maximum sequence length of 1,024 tokens per model
  • Very large tables may need to be trimmed using the row slider
  • Both models work best with structured, clean tabular data

Tech Stack

  • Transformers: AutoModelForSeq2SeqLM, AutoModelForTableQuestionAnswering
  • Gradio: Interactive web interface
  • Pandas: CSV parsing and table handling

Run Locally

bash
git clone https://huggingface.co/spaces/juliensimon/table_questions
cd table_questions
pip install -r requirements.txt
python app.py