Spaces:
Runtime error
Runtime error
| import os | |
| import pandas as pd | |
| from ast import literal_eval | |
| import joblib | |
| import gradio as gr | |
| cdqa_pipeline=joblib.load('aditi2222/question_answer/bert_qa_custom.joblib') #fitted pipleine | |
| def generate_answers(query): | |
| prediction = cdqa_pipeline.predict(query, 3) #provides top three responses | |
| return prediction | |
| iface = gr.Interface(fn=generate_answers, inputs=[gr.inputs.Textbox(lines=30)],outputs=["query"]) | |
| iface.launch(inline=False, share=True) |