Spaces:
Configuration error
Configuration error
Update Readme.md
Browse files
Readme.md
CHANGED
|
@@ -1,109 +1,114 @@
|
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# π WikiTales β Interactive Historical Storybooks
|
| 2 |
+
|
| 3 |
+
> 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.
|
| 4 |
+
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
## Team Members
|
| 8 |
+
- Rishi Palavarapu
|
| 9 |
+
- Harsha Ambati
|
| 10 |
+
- Rishitha Reddy
|
| 11 |
+
- Yaswanth Ambati
|
| 12 |
+
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
## π Overview
|
| 16 |
+
|
| 17 |
+
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.
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## π Key Features
|
| 22 |
+
|
| 23 |
+
- π§ **AI-generated Story Narratives** based on historical events and figures
|
| 24 |
+
- π **Narrator Styles**: Choose between historian, eyewitness, journalist, AI assistant, etc.
|
| 25 |
+
- π§Ύ **Dynamic Timelines** of important events
|
| 26 |
+
- π¬ **Quotes & Primary Sources** from Wikiquote and Wikisource
|
| 27 |
+
- π§ **βDid You Know?β Facts** from Wikidata
|
| 28 |
+
- π **Wikibooks Sidebar** for extended learning material
|
| 29 |
+
- πΈ **Image Carousel** using Wikimedia Commons
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## π οΈ Built With
|
| 34 |
+
|
| 35 |
+
- **Frontend & UI**: [Streamlit](https://streamlit.io/)
|
| 36 |
+
- **Language**: Python 3.10+
|
| 37 |
+
- **Data Sources**:
|
| 38 |
+
- [Wikipedia API](https://en.wikipedia.org/w/api.php)
|
| 39 |
+
- [Wikidata API](https://www.wikidata.org/w/api.php)
|
| 40 |
+
- [Wikibooks API](https://en.wikibooks.org/w/api.php)
|
| 41 |
+
- [Wikiquote API](https://en.wikiquote.org/w/api.php)
|
| 42 |
+
- [Wiktionary API](https://en.wiktionary.org/w/api.php)
|
| 43 |
+
- [Wikisource API](https://en.wikisource.org/w/api.php)
|
| 44 |
+
- [Wikimedia Commons API](https://commons.wikimedia.org/w/api.php)
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
## βοΈ How It Works
|
| 49 |
+
|
| 50 |
+
1. **User enters a topic** (e.g. *World War II*).
|
| 51 |
+
2. WikiTales fetches:
|
| 52 |
+
- Summary from Wikipedia
|
| 53 |
+
- Quotes from Wikiquote
|
| 54 |
+
- Timeline from Wikidata
|
| 55 |
+
- Definitions from Wiktionary
|
| 56 |
+
- Images from Commons
|
| 57 |
+
- Source documents from Wikisource
|
| 58 |
+
- Related books from Wikibooks
|
| 59 |
+
3. Story is narrated using the selected voice and formatted as a storybook.
|
| 60 |
+
4. Additional enhancements include interactive glossary and image carousel.
|
| 61 |
+
|
| 62 |
+
---
|
| 63 |
+
|
| 64 |
+
## π§ Setup Instructions
|
| 65 |
+
|
| 66 |
+
To get started with this project, follow these steps:
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
# Clone the repository
|
| 70 |
+
git clone https://code.swecha.org/soai2025/soai-hackathon/team-titans.git
|
| 71 |
+
|
| 72 |
+
# Navigate to the project folder
|
| 73 |
+
cd team-titans
|
| 74 |
+
|
| 75 |
+
# (Optional but recommended) Create a virtual environment
|
| 76 |
+
python3 -m venv wikitales_venv
|
| 77 |
+
source wikitales_venv/bin/activate
|
| 78 |
+
|
| 79 |
+
# Install dependencies
|
| 80 |
+
pip install -r requirements.txt
|
| 81 |
+
|
| 82 |
+
# Run the app locally
|
| 83 |
+
streamlit run app.py
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
### π Deployment
|
| 89 |
+
|
| 90 |
+
This app is designed to be deployed on [Hugging Face Spaces](https://huggingface.co/spaces) using the **Streamlit template**.
|
| 91 |
+
|
| 92 |
+
---
|
| 93 |
+
|
| 94 |
+
### ποΈ Project Structure
|
| 95 |
+
|
| 96 |
+
```
|
| 97 |
+
WikiTales/
|
| 98 |
+
βββ app.py # Main Streamlit app
|
| 99 |
+
βββ requirements.txt # Python dependencies
|
| 100 |
+
βββ README.md # Project overview and setup
|
| 101 |
+
βββ story_engine/ # All logic modules for fetching and generating story content
|
| 102 |
+
β βββ __init__.py
|
| 103 |
+
β βββ wikipedia.py
|
| 104 |
+
β βββ wikiquote.py
|
| 105 |
+
β βββ wikisource.py
|
| 106 |
+
β βββ commons.py
|
| 107 |
+
β βββ wikidata.py
|
| 108 |
+
β βββ wikibooks.py
|
| 109 |
+
β βββ formatter.py
|
| 110 |
+
β βββ story_builder.py # Core function to build story from APIs
|
| 111 |
+
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
> π `story_engine/` contains modular Python files to keep the logic clean and testable.
|