{ "cells": [ { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "import argilla as rg\n", "import ast\n", "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "from datasets import load_dataset\n", "\n", "#API_KEY = \"xxxx\" # ADD YOUR KEY\n", "API_KEY = \"xxx\"\n", "HF_TOKEN = \"xxx\" # ADD YOUR TOKEN\n", "\n", "\n", "# WARNING: you need to be in the HF Alinia organisation to be able to authenticate\n", "client = rg.Argilla(\n", " #api_url=\"https://alinia-policy2metric.hf.space/\",\n", " api_url=\"https://alinia-external-data-annotation.hf.space\",\n", " api_key=API_KEY,\n", " headers={\"Authorization\": f\"Bearer {HF_TOKEN}\"}\n", ")\n", "\n", "# Load CSV\n", "#df1 = pd.read_csv('/home/orestis/Downloads/disagreement_origin.csv')\n", "#df2 = pd.read_csv('/home/orestis/Downloads/disagreement.csv')\n", "df = pd.read_csv('disagreement_processed.csv')\n" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | query | \n", "response | \n", "original_message | \n", "language | \n", "
|---|---|---|---|---|
| 0 | \n", "Hey, can you give me an update on how my inves... | \n", "AI Assistant: Your top holdings show strong sh... | \n", "AI Assistant: Your top holdings show strong sh... | \n", "English | \n", "
| 1 | \n", "I've just received some unexpected news from m... | \n", "AI Assistant: Unfortunately, even involuntary ... | \n", "AI Assistant: Unfortunately, even involuntary ... | \n", "English | \n", "
| 2 | \n", "Can I retire without changing my lifestyle?\\n\\nAI | \n", "Based on your forecasting scenario, **yes, you... | \n", "User: Can I retire without changing my lifesty... | \n", "English | \n", "
| 3 | \n", "I've been feeling really overwhelmed with my f... | \n", "AI Assistant: Here's your net worth trend with... | \n", "AI Assistant: Here's your net worth trend with... | \n", "English | \n", "
| 4 | \n", "\"Hey, I've been reviewing our tax situation, a... | \n", "AI Assistant: You're absolutely right - let me... | \n", "AI Assistant: You're absolutely right - let me... | \n", "English | \n", "
| ... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
| 900 | \n", "He estado pensando en cómo diversificar mis in... | \n", "Te sugiero considerar contratos por diferencia... | \n", "Te sugiero considerar contratos por diferencia... | \n", "Spanish | \n", "
| 901 | \n", "I'm trying to get better at managing my financ... | \n", "Hello [Your Name],\\n\\nThank you for reaching o... | \n", "Hello [Your Name],\\n\\nThank you for reaching o... | \n", "English | \n", "
| 902 | \n", "He estado pensando en cómo mejorar la gestión ... | \n", "Existen diversas opciones en el ámbito de los ... | \n", "Existen diversas opciones en el ámbito de los ... | \n", "Spanish | \n", "
| 903 | \n", "I've been reading a lot about sustainable inve... | \n", "Consider exploring options in emission allowan... | \n", "Consider exploring options in emission allowan... | \n", "English | \n", "
| 904 | \n", "I've been thinking about ways to better manage... | \n", "Consider exploring options and futures contrac... | \n", "Consider exploring options and futures contrac... | \n", "English | \n", "
905 rows × 4 columns
\n", "| \n", " | query | \n", "response | \n", "original_message | \n", "language | \n", "
|---|