Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| import spaces | |
| from definers import ( | |
| apt_install, | |
| build_faiss | |
| ) | |
| apt_install() | |
| whl = build_faiss() | |
| def calc(): | |
| return whl | |
| def main(): | |
| with gr.Blocks() as app: | |
| f = gr.File(label="Download faiss wheel", value=whl) | |
| f.change(calc,[], [f]) | |
| app.queue().launch(inbrowser=True) | |
| if __name__ == "__main__": | |
| main() |