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

gradio test draft #1200

Closed
wants to merge 25 commits into from
Closed

gradio test draft #1200

wants to merge 25 commits into from

Conversation

april-yyt
Copy link
Collaborator

@april-yyt april-yyt commented Oct 19, 2023

Description of changes:

  • wrapped the runtime and model initialization in incremental decoding and spec infer into a Langchain formatted class
  • integrated with gradio and chainlit for chatbot interfaces, following tutorials:
  1. gradio: https://www.gradio.app/guides/creating-a-chatbot-fast
  2. chainlit: https://docs.chainlit.io/integrations/langchain

Related Issues:

  1. gradio: reponse generate functionality not working when model initialization is called outside of the "predict" function
    for example:
    [would not work]
    model = model_init()
    def predict(message):
    return model.generate(message)
    [would work] but is not what we want since the model should only be initialized once
    def predict(message):
    model = model_init()
    return model.generate(message)
  2. chainlit: integration undergoing debugging

Linked Issues:

Issues closed by this PR:

  • Closes #

This change is Reviewable

@april-yyt april-yyt requested a review from goliaro October 19, 2023 22:57
@goliaro
Copy link
Collaborator

goliaro commented Oct 20, 2023

@april-yyt I ran into the same issues when debugging on my machine. Perhaps we can look at the Ray Serve integration (https://docs.ray.io/en/latest/serve/tutorials/gradio-integration.html), they might have had to solve similar issues

@jiazhihao
Copy link
Collaborator

@april-yyt Do we still need this PR? Otherwise, I will close it.

@april-yyt
Copy link
Collaborator Author

@april-yyt Do we still need this PR? Otherwise, I will close it.

We don't need it anymore and feel free to close it, thanks!

@jiazhihao jiazhihao closed this Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants