Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎞️ Film Archivist

A Retrieval-Augmented Generation (RAG) system for the film discovery.

Streamlit App Python 3.11 PyTorch

📖 Overview

The Film Archivist is a Machine Learning application designed to bridge the gap between traditional metadata search and conceptual understanding in Digital Humanities.

Unlike standard databases that rely on keyword matching (e.g., searching for "war" to find war movies), this tool utilizes Semantic Embeddings to understand the meaning of a query. Users can describe a plot, an atmospheric tone, or a complex feeling (e.g., movies about the isolation of space travel), and the system retrieves thematically relevant films even if they don't share specific keywords.

🎓 Academic Context

This project was developed as the final examination for the Machine Learning for Arts and Humanities course at the University of Bologna.

📂 Project Structure

This repository contains the following key files:

File Description
app.py Main Application. Run this file to launch the Semantic Search interface, RAG Chatbot, and Visualization dashboard.
requirements.txt List of all Python dependencies required to run the project (PyTorch, Transformers, Streamlit, etc.).
Dataset/movies.csv Movie Dataset used for the archive. Contains metadata for ~4,800 films.
Semantic Film Archivist.docx The official project report detailing methodology, evaluation metrics (Precision@5), and architectural decisions.

🚀 Key Features

  1. 💬 Semantic Search & RAG Chatbot: Ask the archivist questions in natural language. The system retrieves relevant documents and uses a Generative AI (Flan-T5) to synthesize an answer.
  2. 🌌 Cultural Map (Visualization): An interactive 2D scatter plot using Principal Component Analysis (PCA) to visualize how 4,800 movies cluster together based on narrative similarity.
  3. 🎯 Automated Evaluation: A built-in testing suite that calculates Precision@5 to quantitatively measure the retrieval accuracy against ground-truth thematic queries.
  4. 📅 Temporal Analysis: Tools to filter and analyze the dominance of specific genres across different decades of cinema history.

🛠️ Tech Stack

This project implements a full ML pipeline aligned with the course syllabus:

  • Deep Learning: PyTorch (Tensor computations)
  • NLP & Transformers: sentence-transformers (SBERT embeddings) & transformers (Flan-T5 generation)
  • Unsupervised Learning: Scikit-Learn (K-Means Clustering & PCA)
  • Visualization: Plotly Express
  • Frontend: Streamlit

⚙️ Installation & Usage

You can run this project locally on your machine.

1. Clone the repository

git clone [https://github.com/katyakrsn/archivist.git](https://github.com/katyakrsn/archivist.git)
cd archivist

About

A Semantic Search & RAG Chatbot for cultural heritage discovery. Created for the "Machine Learning for Arts and Humanities" course (UNIBO) to explore film archives using natural language and latent feature clustering.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages