File size: 444 Bytes
0125fff
0b7b04f
 
 
 
 
 
 
21af2ca
0125fff
 
21af2ca
0125fff
 
0b7b04f
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
import json
import numpy as np
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer

from datasets import load_dataset

text_dataset = load_dataset("HuggingFaceFW/fineweb", name="sample-10BT", split="train", streaming=True, column_names=['text'])

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

app = gr.Interface(fn=greet, inputs="text", outputs="text")
app.launch()