15,179 Topics
| |
AI-powered code reviews are bringing about a revolution in the way developers collaborate, enabling more efficient, accurate, and thorough evaluations of code prior to its integration into the central project repository. This transformation is made possible by leveraging machine learning and artificial intelligence to automate and enhance different facets of … | |
In a previous article, I explained [how to fine-tune Google's Gemma model for text classification](https://www.daniweb.com/programming/computer-science/tutorials/541544/fine-tuning-google-gemma-model-for-text-classification-in-python). In this article, I will explain how you can improve performance of a pretrained large language model (LLM) using retrieval augmented generation (RAG) technique. So, let's begin without ado. ## What is Retrieval Augmented Generation … | |
On February 21, 2024, Google released [Gemma](https://ai.google.dev/gemma), a family of state-of-the-art open-source large language models (LLMs). As per initial results, its 7b (seven billion parameter) version is known to perform better than Meta's [Llama 2](https://llama.meta.com/), the previous state-of-the-art open-source LLM. As always, my first test with any new open-source LLM … | |
I am trying to extract three values from the td tags in an html downloaded file. <tr align="right"><td>236</td><td>Roy</td><td>Allyson</td> <tr align="right"><td>237</td><td>Marvin</td><td>Pamela</td> <tr align="right"><td>238</td><td>Micah</td><td>Kristine</td> <tr align="right"><td>239</td><td>Collin</td><td>Raquel</td> I am using the pattern match = re.findall(r'<td.?>([\d+])([.?])*<\/td>', file) The file is created with a read() statement. The output should look like (236, "Roy", "Allyson") (237, … | |
I am trying to extract three values from the td tags in an html downloaded file. <tr align="right"><td>236</td><td>Roy</td><td>Allyson</td> <tr align="right"><td>237</td><td>Marvin</td><td>Pamela</td> <tr align="right"><td>238</td><td>Micah</td><td>Kristine</td> <tr align="right"><td>239</td><td>Collin</td><td>Raquel</td> I am using the pattern match = re.findall(r'<td.*?>([\d+])([.*?])*<\/td>', file) The file is created with a read() statement. The output should look like (236, "Roy", "Allyson") (237, … | |
I am working on an exercise from Google's Python class dealing with popular baby names. I have the program running properly when using only one filename, but when I try to use the wildcard to get all files with baby####.html files I get differing errors every time I run the … | |
In my previous article, I explained [how to convert PDF image to CSV using Multimodal Google Gemini Pro](https://www.daniweb.com/programming/computer-science/tutorials/541365/converting-pdf-image-to-csv-using-multimodal-google-gemini-pro). To do so, I wrote a Python script that passes text command to [Google Gemino Pro](https://blog.google/technology/ai/google-gemini-ai/) for extracting tables from PDF images and storing them in a CSV file. In this article, … | |
I am building a crawler+parser in Python. It has to be run for, like 20 hours. How can I modify the code such that the code execution pauses (before next urllib2.urlopen) when the internet is disconnected, and AUTOMATICALLY resumes with the same variable values, when the internet connection is back … | |
Integrating language models like ChatGPT into third-party applications has become increasingly popular due to their ability to comprehend and generate human-like text. However, it's crucial to acknowledge the limitations of ChatGPT, such as its knowledge cut-off date in September 2021 and its inability to access external sources like Wikipedia or … | |
I'll admit that I have an opinion about this. Is the point of professional coding to write creative software or to write software that adheres closely to standards? | |
In this article, you will learn to use [Google Gemini Pro](https://blog.google/technology/ai/google-gemini-ai/), a state-of-the-art multimodal generative model, to extract information from PDF and convert it to CSV files. You will use a simple text prompt to tell Google Gemini Pro about the information you want to extract. This is a valuable … | |
In this article, you will learn how to track faces within a video using the Python DeepFace library. Additionally, you'll discover how to include portions of the video background in face tracking by implementing custom methods that utilize the DeepFace library's `extract_faces()` method for face extraction. I explained how to … | |
In this article, we will compare two state-of-the-art large language models for zero-shot text classification: [Google Gemini Pro](https://deepmind.google/technologies/gemini/#introduction) and [OpenAI GPT-4](https://openai.com/research/gpt-4). Zero-shot text classification is a task where a model is trained on a set of labeled examples but can then classify new examples from previously unseen classes. This is … | |
Hey Gang! OK today I am having trouble with my transaction processing application implemented in python/MySQL. Here is some "working" testing code. import psycopg2 from psycopg2 import Error import binascii from binascii import unhexlify import mysql.connector as mysql sql='''CREATE PROCEDURE testprocedure(OUT tacos INT) BEGIN show tables; SET tacos := 1 … | |
For people who used both and build websites with both, which one is better? Why? | |
## Introduction ## This tutorial explains how to perform multiple-label text classification using the [Hugging Face](https://huggingface.co/) transformers library. Hugging Face library implements advanced transformer architectures, proven to be state-of-the-art for various natural language processing tasks, including text classification. Hugging Face library provides trainable transformer models in three flavors: 1. Via … | |
So here, I am gonna to ask developers around which is the most popular language is used to develop a game for students or professionals. | |
I recently tackled a challenging research task involving multimodal data for a classification problem using [TensorFlow Keras](https://www.tensorflow.org/guide/keras). One of the trickiest aspects was figuring out how to load multimodal data in batches from storage efficiently. While TensorFlow Keras offers helpful functions for batch-loading images from various sources, the documentation and … | |
Sentiment analysis, a subfield of Natural Language Processing (NLP), aims to discern and classify the underlying sentiment or emotion expressed in textual data. Whether it is understanding customers' opinions about a product, analyzing social media posts, or gauging public sentiment towards a political event, sentiment analysis plays a vital role … | |
In a [previous tutorial](https://www.daniweb.com/programming/computer-science/tutorials/541123/stock-price-prediction-using-1d-cnn-in-tensorflow-keras), I covered how to predict future stock prices using a deep learning model with 1D CNN layers. This method is effective for basic time series forecasting. Recently, I've enhanced this model by not just considering past closing prices but also factors like Open, High, Low, Volume, … | |
A video is a series of images, or frames, shown in rapid succession. Its frame rate, measured in frames per second (FPS), dictates the display speed. For instance, a 30 FPS video shows 30 frames each second. The frame count and frame rate determine a video's detail, smoothness, file size, … | |
## Introduction ## Loss functions are the driving force behind all machine learning algorithms. They quantify how well our models are performing by calculating the difference between the predicted and actual outcomes. The goal of every machine learning algorithm is to minimize this loss function, thereby improving the model’s accuracy. … | |
As a researcher, I have often found myself buried under a mountain of research articles, each promising insights and breakthroughs crucial for my work. The sheer volume of information is overwhelming, and the time it takes to extract the relevant data can be daunting. However, extracting meaningful information from research … | |
Facial emotion detection, as the name suggests, involves detecting emotions from faces in images or videos. Recently, I was working on a facial emotion detection task and came across the DeepFace library that implements various state-of-the-art facial emotion detection models. However, in my experience, the performance of the DeepFace library … | |
Stock price prediction is a challenging task that requires analyzing historical trends, market sentiments, economic indicators, and company performance. One of the popular methods for stock price prediction is using deep learning models, such as convolutional neural networks (CNNs). CNNs are a type of neural network that can extract features … | |
Chatbots are software applications that can interact with humans using natural language. They can be used for various purposes, such as customer service, entertainment, education, and more. Chatbots can be built using different techniques like rule-based systems, machine learning, or deep learning. In this article, I will focus on the … | |
Language modeling is the cornerstone of advanced natural language processing, forming the backbone for cutting-edge technologies like ChatGPT. At its core, it involves predicting words based on context, a fundamental principle underlying modern large language Models (LLMs). There are various techniques for language modeling, with attention mechanisms emerging as the … | |
In this tutorial, you will learn to fine-tune a [Hugging Face Transformers model](https://huggingface.co/docs/transformers/index) for video classification in PyTorch. The Hugging Face documentation provides an example of performing video classification using the Hugging Face Trainer with one of Hugging Face's built-in datasets. However, the process of fine-tuning a video transformer on … | |
I'm working on an application, certainly not my first. Some aspects of my coding background are quite informal, for example I have only a rudimentary understanding of source code repositories. Take library formation, for example? I'm reasonably proud that my source is of sufficient quality and organization to pass an … | |
Understanding facial expressions is crucial for various tasks, from recognizing emotions to enhancing security measures. While extracting faces from pictures is easy, doing the same in videos is tricky. Imagine creating videos with only highlighted facial expressions, offering a unique perspective on human interactions. Various tools are available for face … |
The End.