Spaces:
Sleeping
A newer version of the Streamlit SDK is available: 1.61.1
title: Project10thweek
emoji: 👁
colorFrom: pink
colorTo: purple
sdk: streamlit
sdk_version: 1.31.0
app_file: app.py
pinned: false
license: mit
cv_project
Natural language processing🙂
Elbrus Bootcamp | Phase-2 | Team Project
Team🧑🏻💻
Task 📌
Build a text classification application using different machine learning models🗂️
Contents 📝
1.Classification of restaurant reviews 🍱 🤖Classic ML algorithm trained on the BagOfWords/TF-IDF representation 🤖RNN or LSTM model (preferably use the attention option) 🤖BERT based Dataset 2.Classification of news topics from telegram channels🗞️ 🤖Rubert-tiny2 Dataset
Deployment 🎈
The service is implemented on Huggingface🤗
Libraries 📖
import streamlit as st
import torch
from transformers import AutoTokenizer, AutoModel
import joblib
import numpy as np
import json
import pandas as pd
from gensim.models import Word2Vec
import time
from typing import Tuple
from torch.utils.data import DataLoader, TensorDataset
import torch.nn.functional as F
import torch.nn as nn
from torchmetrics import Accuracy
from torchmetrics.functional import f1_score
from string import punctuation
import sklearn as sk
import os
from sklearn.linear_model import LogisticRegression
Guide 📜
How to run locally?
To create a Python virtual environment for running the code, enter:
python3 -m venv myvenvActivate the new environment:
- Windows:
myvenv\Scripts\activate.bat - macOS and Linux:
source myvenv/bin/activate
- Windows:
Install all dependencies from the requirements.txt file:
pip install -r requirements.txt
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference