-
Notifications
You must be signed in to change notification settings - Fork 1k
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
add gradio support #46
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR! I'll be taking a look at this soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the direction this patch is going with providing a nice Gradio interface. But, unless I'm missing something, it needs to format the input_text
from the text box into a prompt suitable for the language model. Please see inference/conversation.py for a helper class that constructs prompts.
inference/gradio_openchatkit.py
Outdated
import sys | ||
|
||
CUR_DIR = os.path.abspath(os.path.dirname(__file__)) | ||
MODEL_PATH = os.path.join(CUR_DIR, "../../GPT-NeoXT-Chat-Base-20B/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should be
MODEL_PATH = os.path.join(CUR_DIR, "../../GPT-NeoXT-Chat-Base-20B/") | |
MODEL_PATH = os.path.join(CUR_DIR, "../huggingface_models/GPT-NeoXT-Chat-Base-20B/") |
@csris ok, I have updated the code. Thank you! |
Thanks! Will look. |
response = self.conv.get_last_turn() | ||
|
||
state = state + [(input_text, response)] | ||
return state, state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the same state object being returned twice from this function?
to add gradio support