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

🤖 Update readme.md with RAG example #32

Merged
merged 1 commit into from
Jan 1, 2024
Merged

Conversation

kadirnar
Copy link
Owner

No description provided.

@kadirnar kadirnar added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 29, 2023
@kadirnar kadirnar self-assigned this Dec 29, 2023
@kadirnar
Copy link
Owner Author

@akashAD98

Could you check the readme.md file? Which input formats does it support? Just str? Does it support extensions such as mp4, pdf, audio, md?

We need it. How can we do this?
https://github.com/safevideo/autollm/tree/main?tab=readme-ov-file#create-a-query-engine-in-seconds

@akashAD98
Copy link
Contributor

@kadirnar in readme add question
"give me a summary of the video? instead of What is mistral.?
so its more relavant

@akashAD98
Copy link
Contributor

need to fix it

image

@akashAD98
Copy link
Contributor

@kadirnar Also, should we provide an option for users to specify their text input path?

Here's the general workflow:

Pass the YouTube link to the system, like so:

url = "https://www.youtube.com/watch?v=di3rHkEZuUw"
# Initialize the Speech to Text Pipeline with the specified model.
audio_path = download_and_convert_to_mp3(url)
pipeline = SpeechToTextPipeline(model_id="openai/whisper-large-v3")

need to update saving .text part

with open("transcript.txt", "w") as file:
    file.write(transcript)

After processing, save the transcript as a text file in the same folder.

Use the RAG (Retrieval-Augmented Generation) model for asking questions about the video. By default, the system will use the transcript.txt file. Users can ask questions to gain insights from the video content.

There's no need to support PDF files in this scenario; text format will suffice. This workflow provides a complete end-to-end example for those who want to summarize YouTube videos or any other video content."

@kadirnar
Copy link
Owner Author

@kadirnar Also, should we provide an option for users to specify their text input path?

Here's the general workflow:

Pass the YouTube link to the system, like so:

url = "https://www.youtube.com/watch?v=di3rHkEZuUw"
# Initialize the Speech to Text Pipeline with the specified model.
audio_path = download_and_convert_to_mp3(url)
pipeline = SpeechToTextPipeline(model_id="openai/whisper-large-v3")

need to update saving .text part

with open("transcript.txt", "w") as file:
    file.write(transcript)

After processing, save the transcript as a text file in the same folder.

Use the RAG (Retrieval-Augmented Generation) model for asking questions about the video. By default, the system will use the transcript.txt file. Users can ask questions to gain insights from the video content.

There's no need to support PDF files in this scenario; text format will suffice. This workflow provides a complete end-to-end example for those who want to summarize YouTube videos or any other video content."

I understand There is no need right now. I can add it later. We shouldn't recognize manual models. Can you fix this?

https://github.com/kadirnar/whisper-plus/blob/main/whisperplus/pipelines/chatbot.py#L12

@akashAD98
Copy link
Contributor

@kadirnar Also, should we provide an option for users to specify their text input path?
Here's the general workflow:
Pass the YouTube link to the system, like so:

url = "https://www.youtube.com/watch?v=di3rHkEZuUw"
# Initialize the Speech to Text Pipeline with the specified model.
audio_path = download_and_convert_to_mp3(url)
pipeline = SpeechToTextPipeline(model_id="openai/whisper-large-v3")

need to update saving .text part

with open("transcript.txt", "w") as file:
    file.write(transcript)

After processing, save the transcript as a text file in the same folder.
Use the RAG (Retrieval-Augmented Generation) model for asking questions about the video. By default, the system will use the transcript.txt file. Users can ask questions to gain insights from the video content.
There's no need to support PDF files in this scenario; text format will suffice. This workflow provides a complete end-to-end example for those who want to summarize YouTube videos or any other video content."

I understand There is no need right now. I can add it later. We shouldn't recognize manual models. Can you fix this?

https://github.com/kadirnar/whisper-plus/blob/main/whisperplus/pipelines/chatbot.py#L12

can we add openai embedding model there?

@akashAD98
Copy link
Contributor

akashAD98 commented Jan 1, 2024

@kadirnar whats issue we are getting for that embedding model?

should we add this?

from langchain.embeddings import OpenAIEmbeddings

embeddings_model = OpenAIEmbeddings(openai_api_key="...")

but need to provide the api ,that not possible for each user

below is also opensource

from langchain.embeddings import HuggingFaceEmbeddings
 HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2',
                                   model_kwargs={'device': 'cpu'})

@kadirnar
Copy link
Owner Author

kadirnar commented Jan 1, 2024

@kadirnar whats issue we are getting for that embedding model?

should we add this?

from langchain.embeddings import OpenAIEmbeddings

embeddings_model = OpenAIEmbeddings(openai_api_key="...")

but need to provide the api ,that not possible for each user

below is also opensource

from langchain.embeddings import HuggingFaceEmbeddings
 HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2',
                                   model_kwargs={'device': 'cpu'})

I want the user to decide this. You must add model_path parameter to the function. When I want to change the model, I do not want to look at the source codes. We just have to do this by using the load_llm_model function.

@akashAD98
Copy link
Contributor

@kadirnar got it ill work on it

@kadirnar kadirnar merged commit 6e9417c into main Jan 1, 2024
13 checks passed
@kadirnar kadirnar deleted the update-readme-version branch January 1, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants