Spaces:
Running
Running
File size: 358 Bytes
c796372 dac1e43 c796372 dac1e43 c796372 dac1e43 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import duckdb
import gradio as gr
con = duckdb.connect(":memory:")
def greet(SQL_Query):
return con.sql(SQL_Query).df()
examples = [
"SELECT dump, avg(token_count) FROM 'hf://datasets/HuggingFaceFW/fineweb/sample/10BT/*.parquet' GROUP BY dump;",
]
demo = gr.Interface(fn=greet, inputs="text", outputs="dataframe", examples=examples)
demo.launch()
|