-
Notifications
You must be signed in to change notification settings - Fork 458
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
[Issue# 1189] Hugging Face - Question Answering Notebook #1188
Conversation
Adding Question Answering notebook using Hugging Face Transformers.
@muhtalhakhan can you create Issue and attach it to PR (see message from @Dr0p42) + add it to the Community roadmap: https://github.com/orgs/jupyter-naas/projects/4?fullscreen=true This is how it's supposed to be done so we can track your progress. |
Hi @muhtalhakhan for your contribution, I just reviewed your notebook and changed it to pass the control:
After passing the control, I tried to run your notebook but it throws me several errors. |
Hey @fravenel, I am glad that you took the time and fixed the errors popping out. I apologise for the late response, was busy with my Final year project phase 1, and its done. I am into phase 2 now. I have also checked the committed notebook and the code, I will follow the same procedure for the upcoming templates as well. I would love to take your guidance alongside. Thank you. |
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.
@muhtalhakhan, I don't see any change, I still have the same error as I mentioned above. |
Hey @fravenel, I had checked and checked it by now. Every cell is working properly. Attaching the screenshots. If you still find anything missing then do let me know as I would be needing help then. |
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.
Reviewed the changes to the commit you did way before @jravenel
Thank you!
@muhtalhakhan can you please check in a Naas cloud environment? I see you are in vs code but as explained in README it's critical we are all in a same env for testing. This is what Naas cloud is for. Thanks a lot 🙏 |
Not sure I get that 😅 |
Okay, I got your point @jravenel, now I will test it there at Naas Cloud Env. Sorry for the hassle. |
😳 |
fixed issue #1189 |
@muhtalhakhan I just tried the template. I managed to install the module and run the notebook but here are my feedback : 1/ the h2 is redundant with the title, can you remove it? 2/ the description is not enough to understand the use case and misleading, you talk about searching in a document but there is no input document provided. 3/ try expect to install transformer and then in the cell below another time seems redundant also here 4/ a few test I made where giving irrelevant reponses like when I ask the number of countries and the answer is "countries" 5/ you say in the description that you can run without context but the code says "cannot be empty" Overall, it needs a bit of rework, I think you can increase value by passing a document, otherwise it's not really obvious what this template can bring. I hope this feedback is useful? |
removing Community Roadmap from Projects section, it should not be in PR, cf README |
Hey @jravenel, I will work over your review and make more sense in the description. 1/ Yeah, I will change this. 2/ Yeah, we can add document there already but for that I will be needing some help to embed it there while accessing the template as it is using a pipeline which needs a context as an input and context here can be the text from the data or any document's data and afterwards a question would be asked which would be starting with question words. 3/ Yeah, I feel that I overlooked it. Will remove it for sure. 4/yeah, it will fail that countries one as you have not provided an input stating the countries name or some text describing the context for which you are asking the question. 5/I will double check my description as with an empty context we cannot run and ask question. Yeah the feedback is valuable and detailed, If you find sometime tomorrow @ Friday then I want to lend some time with you related to this "PR". Thank you Spidey |
could not understand the "cf README". |
cf = refer to README. 1/ good, let's be more specific on this template being able to answer questions from a PDF document All clear? |
1/ already working on it. 2/Nice idea, I can add a thing to fetch the text from pdf. 3/thank you! 4/Exactly but it requires some input to be answered, and yeah will be adding that bitcoin use case. 5/on it. Yeah.. Will get back to you. |
For fetching the text from pdf @muhtalhakhan check out what @MinuraPunchihewa is working on in the product roadmap he has done a template for that! |
Yeah, I saw that but I'll be using a library called as PyPDF. |
Changed accordingly with the proposed feedback. Requiring a review from @jravenel on this.
Hey @jravenel made the changes accordingly, please check and let me know if anything further needs my attention. Thank you! |
Hey @jravenel , your review is required. Please check kindly. Do let me know! |
@muhtalhakhan did you test the notebook on your end because I'm not able to get anything from the notebook: no answers. |
I will be checking it all again and if I couldn't do anything useful I'll
close that PR with a comment mentioning the issue there.
But- I need a day or two for sitting against the laptop.
…On Tue, 1 Nov 2022, 05:49 Jeremy Ravenel, ***@***.***> wrote:
Hey @jravenel <https://github.com/jravenel> , your review is required.
Please check kindly.
Do let me know!
@muhtalhakhan <https://github.com/muhtalhakhan> did you test the notebook
on your end because I'm not able to get anything from the notebook: no
answers.
I ask the simple question "What is bitcoin?" where I would expect the
first occurrence to be replied "A Peer-to-Peer Electronic Cash System" but
nothing comes out, check the GIF here to see.
If you have a question that actually works please share, I cannot validate
as it is as there is nothing to show.
Thanks for your feedback
[image: Nov-01-2022 01-45-19]
<https://user-images.githubusercontent.com/21052349/199135147-7cab5c8c-7ce2-4f9c-96f0-fa1eda2c235b.gif>
—
Reply to this email directly, view it on GitHub
<#1188 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APA3FDA7SWYXLUAXELVV24LWGBSJZANCNFSM6AAAAAAQYIPNEY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hey @jravenel , I have attached the video and screenshot of the notebook that how is it working and checked it again. Looking forward. Naas.mp4 |
Hey @muhtalhakhan it worked for me now. I asked I guess that's good enough: I'm happy that it's working.
|
It made my day 😎 |
// Adding Question Answering notebook using Hugging Face Transformers.
Question Answering models can retrieve the answer to a question from a given text, which is useful for searching for an answer in a document. Some question answering models can generate answers without context!
Loading the pipeline
Import Pipeline from Transformer after installing the transformers and tensorflow.
Input
The input would be the text from any source.
Output
For the output a new window is opened at the link provided above by Gradio, where you can enter your context and get your answer delivered.