Spaces:
Configuration error
Configuration error
File size: 3,726 Bytes
c329686 5e9268b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
---
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. |