Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gradio): enhance gradio interface #90

Merged
merged 12 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/visualize_fallback_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def main():

user_collection.set_fallback(fallback_collection).set_fallback(second_fallback_collection)

gradio_interface = await create_gradio_interface(user_collection=user_collection)
gradio_interface = create_gradio_interface(user_collection)
gradio_interface.launch()


Expand Down
7 changes: 5 additions & 2 deletions examples/visualize_views_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@
from dbally.llms.litellm import LiteLLM


async def main():
async def main() -> None:
await country_similarity.update()

llm = LiteLLM(model_name="gpt-3.5-turbo")
dbally.event_handlers = [CLIEventHandler(), BufferEventHandler()]

collection = dbally.create_collection("candidates", llm)
collection.add(CandidateView, lambda: CandidateView(engine))
collection.add(SampleText2SQLViewCyphers, lambda: SampleText2SQLViewCyphers(create_freeform_memory_engine()))
gradio_interface = await create_gradio_interface(user_collection=collection)

gradio_interface = create_gradio_interface(collection)
gradio_interface.launch()


Expand Down
2 changes: 1 addition & 1 deletion src/dbally/gradio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from dbally.gradio.gradio_interface import create_gradio_interface
from dbally.gradio.interface import create_gradio_interface

__all__ = ["create_gradio_interface"]
301 changes: 0 additions & 301 deletions src/dbally/gradio/gradio_interface.py

This file was deleted.

Loading
Loading