File size: 502 Bytes
a5c227b 7e30e03 a5c227b 7e30e03 ff9d3e4 2ab07b1 93bc6ed ff9d3e4 93bc6ed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# Use a pipeline as a high-level helper
from transformers import pipeline
import streamlit as st
import pandas as pd
pipe = pipeline("table-question-answering", model="google/tapas-large-finetuned-wtq")
st.title('Query your data with text')
file = st.file_uploader('Upload a csv file here')
if file is not None:
query = st.text_input('Query')
data = pd.read_csv(file)
st.subheader('Data')
st.table(data.head())
if query:
st.write(pipe(table=data, query=query))
|