Spaces:
Build error
Build error
File size: 650 Bytes
5dba94f 5f34de0 590a354 5dba94f 54a68e8 a562860 5dba94f 54a68e8 5dba94f fa07c48 5dba94f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
import torch
from transformers import pipeline
import pandas as pd
tqa = pipeline(task = 'table-question-answering',model='google/tapas-base-finetuned-wtq')
table = pd.read_csv("queries.csv")
table = table.astype(str)
def input_query(Type_your_query_here):
return (tqa(table=table,query=Type_your_query_here)['answer'])
iface = gr.Interface(fn=input_query,inputs="text",outputs="text", title = "Siva's Assistant",description="My assistant will answer the queries related to our section's Faculty Name,Faculty Mobile Number,Faculity Cabin Number,Classroom Number,Timetable of the class for each subject")
iface.launch()
|