Skip to content

Instantly share code, notes, and snippets.

@avinash010
avinash010 / add_car.rs
Last active December 1, 2023 13:33
reqwest_car_api
#[tokio::main]
async fn main() {
let json_data = r#"
{
"name": "figo",
"brand": "Ford",
"price_range": "2-3lacs",
"car_type": "hatchback"
}
"#;
@avinash010
avinash010 / comment_classifier_ROC_PRC.py
Last active December 19, 2023 04:56
comment_classifier
"""
This module contains functions for training a text classification model, generating ROC and
Precision-Recall curves, and evaluating the model's performance. The data is preprocessed,
undersampled, and a Naive Bayes classifier is trained.
"""
import os
import pickle
import csv
import pandas as pd
import numpy as np
@avinash010
avinash010 / sentiment_analysis.py
Last active July 18, 2023 15:47
Sentiment Analysis compare models
"""
Compare the model performance of Roberta model against ChatGPT model for tweet dataset
"""
import pandas as pd
from sentiment_analysis_gpt import SentimentAnalyzerGPT
from sentiment_analysis_roberta import SentimentAnalyzerROBERTA
import csv
class SentimentAnalyzer: