To create simple UI interface use create_gradio_interface function It allows to display Data Preview related to Views and execute user queries.
pip install dbally["gradio"]
When You plan to use some other feature like faiss similarity store install them as well.
pip install dbally["faiss"]
Define collection with implemented views
llm = LiteLLM(model_name="gpt-3.5-turbo")
await country_similarity.update()
collection = dbally.create_collection("recruitment", llm, event_handlers=[CLIEventHandler()])
collection.add(CandidateView, lambda: CandidateView(engine))
collection.add(SampleText2SQLViewCyphers, lambda: SampleText2SQLViewCyphers(create_freeform_memory_engine()))
Create gradio interface
gradio_interface = await create_gradio_interface(user_collection=collection)
Launch the gradio interface. To publish public interface pass argument share=True
gradio_interface.launch()
The endpoint is set by triggering python module with Gradio Adapter launch command. Private endpoint is set to http://127.0.0.1:7860/ by default.