Spaces:
Configuration error
title: WikiTales
emoji: π
colorFrom: indigo
colorTo: pink
sdk: streamlit
sdk_version: 1.35.0
app_file: app.py
pinned: false
π WikiTales β Interactive Historical Storybooks
WikiTales is an open-source, story-driven web app that transforms raw historical data from Wikimedia projects into immersive, engaging storybook-style narratives. Built with Python and Streamlit, itβs designed to help learners explore the past like never before.
Team Members
- Rishi Palavarapu
- Harsha Ambati
- Rishitha Reddy
- Yaswanth Ambati
π Overview
WikiTales bridges storytelling and research by compiling content from Wikimedia public APIs such as Wikipedia, Wikiquote, Wikidata, Wikisource, Wikibooks, and more. It generates narrative summaries, trivia facts, quotes, timelines, and glossary definitions based on user-entered topics.
π Key Features
- π§ AI-generated Story Narratives based on historical events and figures
- π Narrator Styles: Choose between historian, eyewitness, journalist, AI assistant, etc.
- π§Ύ Dynamic Timelines of important events
- π¬ Quotes & Primary Sources from Wikiquote and Wikisource
- π§ βDid You Know?β Facts from Wikidata
- π Wikibooks Sidebar for extended learning material
- πΈ Image Carousel using Wikimedia Commons
π οΈ Built With
- Frontend & UI: Streamlit
- Language: Python 3.10+
- Data Sources:
βοΈ How It Works
- User enters a topic (e.g. World War II).
- WikiTales fetches:
- Summary from Wikipedia
- Quotes from Wikiquote
- Timeline from Wikidata
- Definitions from Wiktionary
- Images from Commons
- Source documents from Wikisource
- Related books from Wikibooks
- Story is narrated using the selected voice and formatted as a storybook.
- Additional enhancements include interactive glossary and image carousel.
π§ Setup Instructions
To get started with this project, follow these steps:
# Clone the repository
git clone https://code.swecha.org/soai2025/soai-hackathon/team-titans.git
# Navigate to the project folder
cd team-titans
# (Optional but recommended) Create a virtual environment
python3 -m venv wikitales_venv
source wikitales_venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run the app locally
streamlit run app.py
π Deployment
This app is designed to be deployed on Hugging Face Spaces using the Streamlit template.
ποΈ Project Structure
WikiTales/
βββ app.py # Main Streamlit app
βββ requirements.txt # Python dependencies
βββ README.md # Project overview and setup
βββ story_engine/ # All logic modules for fetching and generating story content
β βββ __init__.py
β βββ wikipedia.py
β βββ wikiquote.py
β βββ wikisource.py
β βββ commons.py
β βββ wikidata.py
β βββ wikibooks.py
β βββ formatter.py
β βββ story_builder.py # Core function to build story from APIs
π
story_engine/contains modular Python files to keep the logic clean and testable.