Loading…
Transcript

Continuous Bag of Word (CBOW)

Train a custom Word2Vec model on a small dataset. Train embeddings on a domain-specific corpus (e.g., legal, medical) and analyze how embeddings capture domain-specific semantics.

Key features:

- transformers

- datasets

- model hubs

- accelerate

- diffusers

- spaces

6. Use a pre-trained Hugging Face model to analyze sentiment in text. Assume a real-world application, Load the sentiment analysis pipeline. Analyze the sentiment by giving sentences to input.

5. Use word embeddings to create meaningful sentences for creative tasks. Retrieve similar words for a seed word.Create a sentence or story using these words as a starting point. Write a program that: Takes a seed word. Generates similar words. Constructs a short paragraph using these words

7. Summarize long texts using a pre-trained summarization model using Hugging face model. Load the summarization pipeline. Take a passage as input and obtain the summarized text

AI and machine learning models deal with complex data structures, requiring strict validation, conversion, and serialization. Pydantic ensures that data is correctly formatted before being fed into AI models, reducing errors and improving robustness.

9. Take the Institution name as input. Use Pydantic to define the schema for the desired output and create a custom output parser. Invoke the Chain and Fetch Results. Extract the below Institution related details from Wikipedia: The founder of the Institution. When it was founded. The current branches in the institution . How many employees are working in it. A brief 4-line summary of the institution.

Pretrained word embeddings

1. Explore pre-trained word vectors. Explore word relationships using vector arithmetic. Perform arithmetic operations and analyze results.

What is Cohere?

Cohere is a company that builds large language models (LLMs) — similar to OpenAI’s GPT or Anthropic’s Claude — but with its own twist.

Build a chatbot for the Indian Penal Code. We'll start by downloading the official Indian Penal Code document, and then we'll create a chatbot that can interact with it. Users will be able to ask questions about the Indian Penal Code and have a conversation with it.

Install langchain, cohere (for key), langchain-community. Get the api key( By logging into Cohere and obtaining the cohere key).

Load a text document from your google drive . Create a prompt template to display the output in a particular manner

Get file from Google drive