File size: 862 Bytes
0a2b540
78582dd
9282412
 
 
 
 
3198832
 
 
 
 
 
 
 
 
 
 
 
ee1afb1
3198832
 
9282412
0a2b540
 
 
 
b69cd9d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import gradio as gr
import argilla as rg
import os

from datasets import load_dataset

dataset = load_dataset("dvilasuero/banking_app", split="train").shuffle()
# You can find your Space URL behind the Embed this space button
# Change it
rg.init(
    api_url="https://ravi259-sml-argilla.hf.space", 
    api_key="admin.apikey"
)
banking_ds = load_dataset("argilla/banking_sentiment_setfit", split="train")
# Argilla expects labels in the annotation column
# We include labels for demo purposes
banking_ds = banking_ds.rename_column("label", "annotation")
# Build argilla dataset from datasets
argilla_ds = rg.read_datasets(banking_ds, task="TextClassification")

# Create dataset
rg.log(argilla_ds, "bankingapp_sentiment")

def greet(name):
    return "Hello " + name + "!!"

iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch(share=True)