Skip to content

we-bears/NLP-Turkish-Brand-Entity-Sentiment-Recognizer

Repository files navigation

2024 Teknofest, Turkish Natural Language Processing Competition Natural Language Processing Scenario.

This project was prepared for the Teknofest Acıkhack2024TDDİ competition.


Model Integration with FastAPI

This project aims to deploy a model trained with PyTorch in a web-based application using FastAPI. Additionally, you can test the deployed model using this Streamlit link: Streamlit

Setup

First, install the required dependencies:

pip install -r requirements.txt

Downloading the Model and Tokenizer

Since the model size exceeds GitHub's 100MB limit, it has been uploaded to Google Drive. Download the trained model and tokenizer from the Google Drive link below and place them in the same directory as app.py:

Download the Model and Tokenizer

Running the Application

Start your FastAPI application using the command below:

python app.py

Swagger Interface

To access the Swagger interface provided by FastAPI, visit the following address in your browser:

http://127.0.0.1:8000/docs

Through this interface, you can test your API and access the documentation.

Project Structure

.
├── app.py              
├── model.py            
│── model.pth
│── tokenizer.json
|── requirements.txt
└── README.md         

Retraining

Data and Tokenizer are shared in the train/data directory. To retrain the model, follow the steps in the train.ipynb notebook located in the train directory. Once training is complete, the model will output the results.

License

This project is licensed under the Apache 2.0 License. For more information, see the LICENSE file.

Data Sources

https://huggingface.co/datasets/kmkarakaya/turkishReviews-ds

https://tr.wikipedia.org/

👨‍👩‍👧‍👦We Bears Team Members

  • 🙋‍♂️Burhan Yıldız

  • 🙋‍♂️Hüseyin Baytar

  • 🙋‍♂️Mesut Duman


📺 Presentation

We.Bears.-.Presentation.mp4