Skip to content

Instantly share code, notes, and snippets.

View PhilipMay's full-sized avatar
🇺🇦

Philip May PhilipMay

🇺🇦
View GitHub Profile
@PhilipMay
PhilipMay / new-open-ai-azure-chat.ipynb
Created January 4, 2024 20:10
new-open-ai-azure-chat.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PhilipMay
PhilipMay / gist:6b5dfeeefc90b12e837c2f40d5bfce1b
Created January 4, 2024 20:08
new-open-ai-azure-chat.ipynb
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "134cb3e4-05ef-447f-aabc-eacb9b7414cd",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
from torch.utils.data import DataLoader
import math
from sentence_transformers import models, losses
from sentence_transformers import SentencesDataset, LoggingHandler, SentenceTransformer, util, InputExample
from sentence_transformers.evaluation import EmbeddingSimilarityEvaluator, SimilarityFunction
import logging
from datetime import datetime
import sys
import os
import gzip
import logging
from pathlib import Path
import torch
import random
import pandas as pd
from sklearn.metrics import f1_score
from farm.data_handler.data_silo import DataSilo, DataSiloForCrossVal
from farm.data_handler.processor import TextClassificationProcessor
from farm.modeling.optimization import initialize_optimizer
import logging
from pathlib import Path
import torch
from farm.data_handler.data_silo import DataSilo, DataSiloForCrossVal
from farm.data_handler.processor import TextClassificationProcessor
from farm.modeling.optimization import initialize_optimizer
from farm.modeling.adaptive_model import AdaptiveModel
from farm.modeling.language_model import LanguageModel
from farm.modeling.prediction_head import TextClassificationHead
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.