import oneclass import gradio as gr import pandas as pd def predict_and_download(positive_csv_file, unlabelled_csv_file, n, text): selected_paper_info = oneclass.select_top_n_papers(n, positive_csv_file, unlabelled_csv_file) return selected_paper_info # Create the interface iface = gr.Interface( fn=predict_and_download, inputs=["file", "file", "number", "textbox"], outputs=[gr.DataFrame(label="Selected Papers")], title="Paper Prediction", description="Enter text and upload CSV files for labelled and unlabelled data.", allow_flagging='never' # Disable flagging feature ) iface.launch()