This is a simple web application built with Flask and Hugging Face Transformers. It calculates the cosine similarity between two input sentences using a pre-trained Jina Embeddings model from Hugging Face. The application also provides a user-friendly interface for users to input sentences and view the cosine similarity score.
-
Input Sentences: Users can enter two sentences into the input fields provided on the web interface.
-
Calculation: Upon submitting the form, the application encodes the input sentences using the Jina Embeddings model and computes the cosine similarity between them.
-
Result: The computed cosine similarity score is displayed on the web page, providing users with the similarity measure between their input sentences.
Make sure you have Python installed. If not, you can download it from python.org.
-
Clone the repository:
git clone https://github.com/your-username/cosine-similarity-calculator.git
-
Navigate to the project directory:
cd cosine-similarity-calculator
-
Install the required packages using
pip
:pip install -r requirements.txt
-
Run the Flask application:
python app.py
-
Open your web browser and go to
http://127.0.0.1:5000
to access the Cosine Similarity Calculator. -
Enter two sentences in the input fields and click the "Calculate Cosine Similarity" button.
-
The application will display the cosine similarity score between the input sentences.
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or create a pull request.
This project is licensed under the MIT License.
Note: This readme template is just a starting point. Customize it further to fit the specific details and features of your project.