This project is what we came up for the nostolgia theme at UofT Hacks 11. The project allows users to upload a photo along with a short paragraph about what they did at that location. The photo is converted to base 64. Then using spaCY we parse the text to find the location and Cohere to generate a simple caption for the photo. The location is then passed to geopy to get the latitude and longitude which get sent a SQLAlchemy database along with the the base64 image for storage. The location data is also passed to leaflet where we create a pointer on the map that contains the photo and the cpation that was generated for that location. We also use a relational database to store a users login details.
Contact details for the entire team, (Maxence, Hamza and me) can be found below.
https://drive.google.com/file/d/1b5GzM2NIWVbllz4it4PbFUGiSXsnaOuZ/view?usp=sharing
To get a local copy up and running follow these simple example steps.
This is an example of how to list things you need to use the software and how to install them.
- Flask
- Geopy
- Cohere API
- SQLAlchemy
- ssl
- certifi
- spacy
- python-dotenv (for PostgreSQL support)
- psycopg2-binary (for PostgreSQL support)
pip3 install cohere pip3 install geopy pip3 install flask pip3 install ssl pip3 install certifi pip3 install spacy pip3 install python-dotenv psycopg2-binary
-
Clone the repo
git clone https://github.com/sdey02/Plotted_Memories.git
-
Start the application
python3 app.py
By default, the application uses SQLite. To switch to PostgreSQL:
- Install PostgreSQL on your system
- Create a database and user (see
postgres_setup_guide.mdfor details) - Configure the
.envfile with your PostgreSQL connection string:DATABASE_URL=postgresql://username:password@localhost:5432/plotted_memories - Run the application - it will automatically use PostgreSQL and create the necessary tables
To verify which database is in use, navigate to /db_info in the application.
Plotted Memories lets you uplaod an image along with text about where you were and what you did that day. It can be used as a photo album or as a way to track all the palces you have been to.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Maxence Gilloteaux - https://www.linkedin.com/in/maxenceglt/
Shreyans Dey - https://www.linkedin.com/in/sdey02/
Hamza Zadi - https://www.linkedin.com/in/hmzzaidi/