Spaces:
Sleeping
Sleeping
A newer version of the Streamlit SDK is available:
1.55.0
metadata
title: Tutorial Hackathon
emoji: 🚀
colorFrom: blue
colorTo: red
sdk: streamlit
app_file: app.py
pinned: false
Image Subject Comparison Tutorial
This is a Streamlit-based web application for a tutorial on determining if two images depict the same subject. It presents 8 scenarios based on specific rules, allowing users to select a scenario, view placeholder images, and choose "Yes" or "No" to receive feedback.
Features
- Interactive Scenarios: Select from 8 predefined scenarios.
- Image Display: View two images side-by-side for each scenario.
- Feedback System: Click "Yes" or "No" to get instant feedback on correctness.
- Tutorial Rules: Based on rules for same-subject comparison (e.g., same person vs. associated items).
Scenarios
- Different pictures of the same person - Yes
- Identical or resized picture - Yes
- Different pictures of the same landmark - Yes
- Subject vs. representation (e.g., landmark vs. keychain) - No
- Person vs. associated item (e.g., player vs. jersey) - No
- Person vs. their signature - No
- Person vs. their tombstone - No
- Same person at different ages - Yes
Installation
- Clone or download the repository.
- Install dependencies:
pip install -r requirements.txt
Running Locally
- Ensure you have Python installed.
- Run the Streamlit app:
streamlit run app.py - Open the provided local URL in your browser (usually
http://localhost:8501).
Hosting on Hugging Face Spaces
- Go to Hugging Face Spaces.
- Create a new Space.
- Select "Streamlit" as the SDK.
- Upload
app.pyandrequirements.txt. - The app will be hosted and accessible via the Space's URL.
Usage
- Select a scenario from the dropdown.
- View the two images.
- Click "Yes" or "No" to see if your answer is correct and read the feedback.
Customization
- Images: Replace placeholder URLs in
app.pywith actual Wikimedia Commons image links. - Scenarios: Modify the
scenarioslist inapp.pyto add or change scenarios.
Dependencies
- streamlit
License
[Add license if applicable]