Spaces:
Configuration error
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](https://streamlit.io/) | |
| - **Language**: Python 3.10+ | |
| - **Data Sources**: | |
| - [Wikipedia API](https://en.wikipedia.org/w/api.php) | |
| - [Wikidata API](https://www.wikidata.org/w/api.php) | |
| - [Wikibooks API](https://en.wikibooks.org/w/api.php) | |
| - [Wikiquote API](https://en.wikiquote.org/w/api.php) | |
| - [Wiktionary API](https://en.wiktionary.org/w/api.php) | |
| - [Wikisource API](https://en.wikisource.org/w/api.php) | |
| - [Wikimedia Commons API](https://commons.wikimedia.org/w/api.php) | |
| --- | |
| ## βοΈ How It Works | |
| 1. **User enters a topic** (e.g. *World War II*). | |
| 2. 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 | |
| 3. Story is narrated using the selected voice and formatted as a storybook. | |
| 4. Additional enhancements include interactive glossary and image carousel. | |
| --- | |
| ## π§ Setup Instructions | |
| To get started with this project, follow these steps: | |
| ```bash | |
| # 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](https://huggingface.co/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. |