id stringlengths 7 11 | source stringclasses 1
value | category stringclasses 11
values | title stringlengths 15 214 | text stringlengths 70 30.5k | url stringlengths 57 160 | tags stringlengths 3 113 | created_at int64 1.22B 1.79B |
|---|---|---|---|---|---|---|---|
se_78525221 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to efficiently chunk/embed json? (ollama, chromadb, gp4allembeddings/langchain) | How to efficiently chunk/embed json? (ollama, chromadb, gp4allembeddings/langchain)
I've been working on a simple chatbot, it responds to inquiries in intercom and in telegram. It makes a database of information to pull from based on current support articles in Intercom. It worked pretty well with 150 articles, but as... | https://stackoverflow.com/questions/78525221/how-to-efficiently-chunk-embed-json-ollama-chromadb-gp4allembeddings-langcha | python, artificial-intelligence, large-language-model, llama, ollama | 1,716,492,901 |
se_77968544 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain4j pgvector implementation as an EmbeddingStore? | Langchain4j pgvector implementation as an EmbeddingStore?
I'm building a RAG based AI service using Langchain4j. I have one microservice that is ingesting and saving my documents (pdfs, csv, words...) in my PostgreSQL DB (with vector extension) as embeddings.
From the other hand I'm building another microservice to ho... | https://stackoverflow.com/questions/77968544/langchain4j-pgvector-implementation-as-an-embeddingstore | java, spring, artificial-intelligence, pgvector, langchain4j | 1,707,486,101 |
se_78430061 | stackoverflow | ARTIFICIAL_INTELLIGENCE | im trying to install pip install git+https://github.com/openai/whisper.git into the command prompt but it does not work from whisper AI and im stuck | im trying to install pip install git+https://github.com/openai/whisper.git into the command prompt but it does not work from whisper AI and im stuck
in whisper ai i am trying to put this code into command prompt pip install git+https://github.com/openai/whisper.git and it does not work it just tells me this ERROR: Er... | https://stackoverflow.com/questions/78430061/im-trying-to-install-pip-install-githttps-github-com-openai-whisper-git-into | python, windows, git, artificial-intelligence, command-prompt | 1,714,848,512 |
se_78300896 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Can I use waitress with 1 thread, and order the requests by a priority? | Can I use waitress with 1 thread, and order the requests by a priority?
I am currently using waittress with 1 thread because I am doing an AI inference API, however i would like to implement a priority queue to order the incomming requests.
Is there any way to make waitress resolve requests in a defined order, or is t... | https://stackoverflow.com/questions/78300896/can-i-use-waitress-with-1-thread-and-order-the-requests-by-a-priority | flask, artificial-intelligence, large-language-model, waitress | 1,712,693,562 |
se_78513370 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Image does not render on after ai image is generated and response has finished | Image does not render on after ai image is generated and response has finished
I am coming back to development after years of not working on anything so my skills are rather rusty and I apologize for any improper syntax and formatting issues presented in advance.
I am currently working on a little web app project that... | https://stackoverflow.com/questions/78513370/image-does-not-render-on-after-ai-image-is-generated-and-response-has-finished | python, html, forms, flask, artificial-intelligence | 1,716,310,928 |
se_76543085 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Performance/speed of quantized models | Performance/speed of quantized models
I tried multiple LLMs with quantization and all of them seems to become min 10x slower than the non-quantized version of the respective model. Is this an expected behavior? Is there a benchmark/tracker which has this information?
Most of them takes roughly 120 secs to make the inf... | https://stackoverflow.com/questions/76543085/performance-speed-of-quantized-models | artificial-intelligence, quantization | 1,687,549,658 |
se_78500810 | stackoverflow | ARTIFICIAL_INTELLIGENCE | what is the correct way to load an xml file into reactjs? | what is the correct way to load an xml file into reactjs?
i'm working on a MERN Stack project for the university where users can upload pictures of cars, and i want to use opencv to blur out the license plates, thus i need to use a "haarcascades" file to identify the area.
here is the relevant code:
const handlePhot... | https://stackoverflow.com/questions/78500810/what-is-the-correct-way-to-load-an-xml-file-into-reactjs | javascript, reactjs, xml, opencv, artificial-intelligence | 1,716,060,856 |
se_78511513 | stackoverflow | ARTIFICIAL_INTELLIGENCE | In cpp, return cause std::vector value changed | In cpp, return cause std::vector value changed
Following is my code
#include "gtest/gtest.h"
#include "onnx_helper.h"
#include "vector_helper.h"
#include "opencv_helper.h"
#include <iostream>
#include <opencv2/opencv.hpp>
class OnnxTest : public testing::Test {
protected:
// static void SetUpTestCase()... | https://stackoverflow.com/questions/78511513/in-cpp-return-cause-stdvector-value-changed | c++, artificial-intelligence, onnxruntime | 1,716,290,499 |
se_78506183 | stackoverflow | ARTIFICIAL_INTELLIGENCE | A*: Rotating pipes puzzle heuristic | A*: Rotating pipes puzzle heuristic
School Project: Create an AI who will use A* search to resolve a rotating pipe puzzle (similar to this game pipes_puzzle_game).
To solve this project I represented every possible board configuration as a node of the graph and an move/edge when you can move from one configuration of ... | https://stackoverflow.com/questions/78506183/a-rotating-pipes-puzzle-heuristic | algorithm, search, artificial-intelligence, a-star, heuristics | 1,716,202,374 |
se_78507510 | stackoverflow | ARTIFICIAL_INTELLIGENCE | In cpp, what is way to fix err "use of deleted function ‘Ort::Value::Value(const Ort::Value&)" | In cpp, what is way to fix err "use of deleted function ‘Ort::Value::Value(const Ort::Value&)"
I use following code
const Ort::Value &img_file_to_tensor(std::string input_img_path) {
// Load the image using OpenCV
cv::Mat input_mat = cv::imread(input_img_path);
// Convert to float
cv::cv... | https://stackoverflow.com/questions/78507510/in-cpp-what-is-way-to-fix-err-use-of-deleted-function-ortvaluevalueconst | c++, artificial-intelligence, onnxruntime | 1,716,219,482 |
se_78504924 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Using typescript SDK in Javascript | Using typescript SDK in Javascript
I would like to try use SDK from Antropic so I tried to follow this guide, but stuck with this error:
TypeError: 'text/html' is not a valid JavaScript MIME type.
My guess is that I am not properly handling typescript SDK from JS, but I would appreciated any hint how to move forward.... | https://stackoverflow.com/questions/78504924/using-typescript-sdk-in-javascript | javascript, typescript, sdk, artificial-intelligence | 1,716,185,332 |
se_78505291 | stackoverflow | ARTIFICIAL_INTELLIGENCE | PYPMML Model is returning "None" in the responses when we upgrade to latest version 17 | PYPMML Model is returning "None" in the responses when we upgrade to latest version 17
We are using pypmml package in our flask application. Recently we observed a vulnerability in commons-text-1.6.jar (this comes in site packages when we install pypmml). Vulnerability which exists in commons-text versions >... | https://stackoverflow.com/questions/78505291/pypmml-model-is-returning-none-in-the-responses-when-we-upgrade-to-latest-vers | python, python-3.x, machine-learning, artificial-intelligence, pyp | 1,716,190,814 |
se_78499745 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is there a way to extract multiple grouped images/shapes from docx for use in indesign using AI? | Is there a way to extract multiple grouped images/shapes from docx for use in indesign using AI?
I am trying to automate the workflow from a design perspective in extracting images from a generated report to use inside a presentation. The report is generated through a website (I cannot access the API to get the inform... | https://stackoverflow.com/questions/78499745/is-there-a-way-to-extract-multiple-grouped-images-shapes-from-docx-for-use-in-in | automation, artificial-intelligence, docx, adobe-indesign, image-extraction | 1,716,035,666 |
se_76098432 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use StuffDocumentsChain with ConversationChain in LangChain? | How to use StuffDocumentsChain with ConversationChain in LangChain?
I want to use StuffDocumentsChain but with behaviour of ConversationChain the suggested example in the documentation doesn't work as I want:
import fs from 'fs';
import path from 'path';
import { OpenAI } from "langchain/llms/openai";
import { Recursi... | https://stackoverflow.com/questions/76098432/how-to-use-stuffdocumentschain-with-conversationchain-in-langchain | typescript, artificial-intelligence, openai-api, langchain | 1,682,406,339 |
se_78493968 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ValueError: The layer sequential_1 has never been called and thus has no defined input | ValueError: The layer sequential_1 has never been called and thus has no defined input
I am working on a AI based project wherein I have trained a CNN model and its name is cifar10.h5. I want to pass certain images from this pre-trained model and extract feature vectors of these images from its penultimate layer.
My ... | https://stackoverflow.com/questions/78493968/valueerror-the-layer-sequential-1-has-never-been-called-and-thus-has-no-defined | machine-learning, conv-neural-network, artificial-intelligence | 1,715,928,942 |
se_78493047 | stackoverflow | ARTIFICIAL_INTELLIGENCE | (Beginner)My AI(U-net) isnt training/testing properly | (Beginner)My AI(U-net) isnt training/testing properly
I'm new to AI and Python, so I've been trying to use U-net to create an AI that can identify and segment cracks. My results are like this:
Epoch 5/25
20/20 [==============================] - 42s 2s/step - loss: -12.7775 - accuracy: 0.0591 - dice_coef: 1.3771 - iou:... | https://stackoverflow.com/questions/78493047/beginnermy-aiu-net-isnt-training-testing-properly | numpy, tensorflow, keras, artificial-intelligence, training-data | 1,715,908,012 |
se_78487258 | stackoverflow | ARTIFICIAL_INTELLIGENCE | In cpp, extract code block to meth cause sigsegv | In cpp, extract code block to meth cause sigsegv
Following is err code, it raise err in ort_session.Run
#include "gtest/gtest.h"
#include "onnx_helper.h"
#include "ndarray.h"
#include "opencv_helper.h"
#include "vector_helper.h"
#include <iostream>
#include <opencv2/opencv.hpp>
#include <onnxruntime_cxx_api.h>
class ... | https://stackoverflow.com/questions/78487258/in-cpp-extract-code-block-to-meth-cause-sigsegv | c++, artificial-intelligence, onnx, onnxruntime | 1,715,825,292 |
se_78486660 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AI SDK Retry Error from official vercel page | AI SDK Retry Error from official vercel page
I'm using code from the official AI SDK website and this code does NOT run.
This is the error I'm getting: RetryError [AI_RetryError]: Failed after 3 attempts. Last error: Failed to process error response
I just want to run a basic AI program with nextJS. | https://stackoverflow.com/questions/78486660/ai-sdk-retry-error-from-official-vercel-page | javascript, reactjs, next.js, artificial-intelligence, vercel | 1,715,809,466 |
se_78483124 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Cannot use llm_chat_callback on an instance without a callback_manager attribute | Cannot use llm_chat_callback on an instance without a callback_manager attribute
model_key = {"OpenAI": ["gpt-3.5-turbo","gpt-4"]}
def get_embeddingmodel(self, model_name,api_key):
if model_name in model_key["OpenAI"]:
return OpenAIEmbedding(api_key=api_key)
This is my method to return the Embeddings Model ... | https://stackoverflow.com/questions/78483124/cannot-use-llm-chat-callback-on-an-instance-without-a-callback-manager-attribute | python, artificial-intelligence, large-language-model, llama-index, openaiembeddings | 1,715,767,251 |
se_78480586 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why Do I Need to Retrain Model in Jetson Nano Projects After Kernel Restart or Device Shutdown? | Why Do I Need to Retrain Model in Jetson Nano Projects After Kernel Restart or Device Shutdown?
I've been diving into the "Getting Started with AI on Jetson Nano" course and got my environment all sorted out using Docker. However, I've hit a snag - it seems like every time I restart the kernel in JupyterLab or power d... | https://stackoverflow.com/questions/78480586/why-do-i-need-to-retrain-model-in-jetson-nano-projects-after-kernel-restart-or-d | deep-learning, pytorch, artificial-intelligence, resnet, nvidia-jetson-nano | 1,715,719,542 |
se_78478326 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LinearRegression: NaN Error even after having Simple Imputer in the pipeline | LinearRegression: NaN Error even after having Simple Imputer in the pipeline
I am on the classic California Housing Dataset trying to predict the median house value. So, the dataset contains NaN values in total bedrooms. I used the Simple Imputer to replace them with median values but when I go on to train the model I... | https://stackoverflow.com/questions/78478326/linearregression-nan-error-even-after-having-simple-imputer-in-the-pipeline | machine-learning, artificial-intelligence, linear-regression, pipeline, nan | 1,715,692,176 |
se_78020093 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Chatbot that dynamically selects between database or PDF based on user input | Chatbot that dynamically selects between database or PDF based on user input
I have developed two separate chatbots: one that searches data from my database and another that searches from PDF documents. Now, I want to create a unified chatbot that intelligently decides where to search based on the user's input.
Could ... | https://stackoverflow.com/questions/78020093/chatbot-that-dynamically-selects-between-database-or-pdf-based-on-user-input | artificial-intelligence, chatbot, openai-api, azure-ai, azure-ai-search | 1,708,339,838 |
se_78471070 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Correct way to tag objects with YOLOv5 | Correct way to tag objects with YOLOv5
I need to tag a series of images for sewing detection on fabric. I work with the YOLOv5 algorithm.
The problem I have is that it is not clear to me what should be the optimal way to label these sewings.
The image below shows a sewing in the fabric.
As you can see in the image, t... | https://stackoverflow.com/questions/78471070/correct-way-to-tag-objects-with-yolov5 | machine-learning, deep-learning, artificial-intelligence, yolo, yolov5 | 1,715,590,115 |
se_78470683 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ValueError: Arguments `target` and `output` must have the same shape. Received: target.shape=(None, 512), output.shape=(None, 3) | ValueError: Arguments `target` and `output` must have the same shape. Received: target.shape=(None, 512), output.shape=(None, 3)
I was trying to train a BERT model to solve a multi-classification problem.
I got this error while run the code below:
Arguments `target` and `output` must have the same shape. Received: tar... | https://stackoverflow.com/questions/78470683/valueerror-arguments-target-and-output-must-have-the-same-shape-received | python, tensorflow, artificial-intelligence, classification, bert-language-model | 1,715,585,522 |
se_78466048 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Best First search to find the path from start to goal on a grid that has unassigned cost. Heuristic values | Best First search to find the path from start to goal on a grid that has unassigned cost. Heuristic values
I'm trying to answer this challenge:
Consider the problem of finding a path in the grid shown in this figure from the position 𝑠 to the position 𝑔:
A piece can move on the grid horizontally or vertically, one... | https://stackoverflow.com/questions/78466048/best-first-search-to-find-the-path-from-start-to-goal-on-a-grid-that-has-unassig | algorithm, artificial-intelligence, binary-search-tree | 1,715,460,163 |
se_67725641 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Give a full GitHub repo to LLM with Langchain | Give a full GitHub repo to LLM with Langchain
i am building a code analyser whill will evaluate whole codebase and give me insight about the codebase like what are the technologies used what are the algorithms used and more about the coder how good he is. by using a llm. with langchain I came up with a solution but it... | https://stackoverflow.com/questions/67725641/give-a-full-github-repo-to-llm-with-langchain | python, artificial-intelligence, langchain | 1,622,130,411 |
se_78469835 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can i proceed further in this AI/ML project? | How can i proceed further in this AI/ML project?
I have 10 datasets (.csv) each with 100,000 rows, with each row containing 5 inputs ( -4.0f to +4.0f) and a output column (0/1). I want to train a Neural Network using this and predict the test dataset that I was given (which has 100,000 rows too, but without output col... | https://stackoverflow.com/questions/78469835/how-can-i-proceed-further-in-this-ai-ml-project | machine-learning, deep-learning, neural-network, artificial-intelligence, q-learning | 1,715,567,115 |
se_78468947 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Tensorflow Error in final iteration: Input to reshape is a tensor with 28 values, but the requested shape has 128 | Tensorflow Error in final iteration: Input to reshape is a tensor with 28 values, but the requested shape has 128
def DMRL(n_users, n_items, embed_dim, n_factors):
assert embed_dim % n_factors == 0, "embed_dim must be divisible by n_factors"
user_input = Input(shape=(1,), dtype='int32', name='UserInput')
... | https://stackoverflow.com/questions/78468947/tensorflow-error-in-final-iteration-input-to-reshape-is-a-tensor-with-28-values | python, tensorflow, machine-learning, deep-learning, artificial-intelligence | 1,715,539,467 |
se_78467829 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ValueError: Data cardinality is ambiguous. Make sure all arrays contain the same number of samples.'x' sizes: 8 'y' sizes: 3 | ValueError: Data cardinality is ambiguous. Make sure all arrays contain the same number of samples.'x' sizes: 8 'y' sizes: 3
whenever i try to run this code it shows this value error and i don't know why i check the lenght of the labels and images list and it's equal but x_train and y_train is differen... | https://stackoverflow.com/questions/78467829/valueerror-data-cardinality-is-ambiguous-make-sure-all-arrays-contain-the-same | python, deep-learning, neural-network, conv-neural-network, artificial-intelligence | 1,715,516,395 |
se_78467696 | stackoverflow | ARTIFICIAL_INTELLIGENCE | why the output is Incomprehensible | why the output is Incomprehensible
I am a web developer and I don't know anything about AI, but one of my frinds send me some python code and asked why it's not working
from transformers import GPT2LMHeadModel, GPT2Tokenizer
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
model = GPT2LMHeadModel.from_pretrained("gp... | https://stackoverflow.com/questions/78467696/why-the-output-is-incomprehensible | artificial-intelligence, huggingface-transformers, encode, huggingface-tokenizers, gpt-2 | 1,715,514,027 |
se_78467166 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Multiple issues and errors with tensor flow array / matrix / tensor shape and data manipulation | Multiple issues and errors with tensor flow array / matrix / tensor shape and data manipulation
import tensorflow as tf
import numpy as np
from tqdm import tqdm
from datasets import load_dataset
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras import layers... | https://stackoverflow.com/questions/78467166/multiple-issues-and-errors-with-tensor-flow-array-matrix-tensor-shape-and-da | python, numpy, tensorflow, artificial-intelligence, tensor | 1,715,502,776 |
se_78465497 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Minimax for tictactoe placing multiple values at once | Minimax for tictactoe placing multiple values at once
I am trying to write a TicTacToe game with a minimax ai in JS.
However my minimax function just does not work. I used timeouts to see what happened every function call and discovered that the function placed multiple tiles at once and I cannot for the life of me fi... | https://stackoverflow.com/questions/78465497/minimax-for-tictactoe-placing-multiple-values-at-once | javascript, artificial-intelligence, tic-tac-toe, minimax | 1,715,448,057 |
se_78462606 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Using a* algorithm without having distances | Using a* algorithm without having distances
I have a list of nodes and all of their neighboring nodes. I am trying to get from node X to node Y in the shortest path using A*.
What heuristic should I use? | https://stackoverflow.com/questions/78462606/using-a-algorithm-without-having-distances | algorithm, search, artificial-intelligence, path-finding, a-star | 1,715,376,239 |
se_51408582 | stackoverflow | ARTIFICIAL_INTELLIGENCE | What is the best AI algorithm for time based binary prediction | What is the best AI algorithm for time based binary prediction
What is the best AI algorithm for time based binary prediction based on a database of previous results? With all the algorithms out there, i'm looking for advice on the best algorithm to train itself to predict the next binary number of an incomplete "real... | https://stackoverflow.com/questions/51408582/what-is-the-best-ai-algorithm-for-time-based-binary-prediction | algorithm, neural-network, artificial-intelligence, genetic-algorithm | 1,531,937,920 |
se_78451985 | stackoverflow | ARTIFICIAL_INTELLIGENCE | model. fit() doesn't work when I use class_weight with image segmentation | model. fit() doesn't work when I use class_weight with image segmentation
When creating the dictionary with the weight values, model.fit() does not train, it shows the following error
I used the following code
import pathlib
import tensorflow as tf
import imageio
import numpy as np
import keras
import glob
import ... | https://stackoverflow.com/questions/78451985/model-fit-doesnt-work-when-i-use-class-weight-with-image-segmentation | python, keras, deep-learning, artificial-intelligence, semantic-segmentation | 1,715,222,474 |
se_78463290 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to make LLMs answer in certain pattern | How to make LLMs answer in certain pattern
How can I design the LLM program so that the LLM will answer in some preset pattern?For example, if I want to use the LLM to promote some products or collect some information from the user, what adjustment should I try on the LLM program? Thx~
I tried modifying the prompts bu... | https://stackoverflow.com/questions/78463290/how-to-make-llms-answer-in-certain-pattern | nlp, artificial-intelligence, openai-api, large-language-model | 1,715,398,081 |
se_78461927 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Unity 2D Platform Game AI | Unity 2D Platform Game AI
Im trying to make an ai enemy but when i build the game it says "NullReferenceException: Object reference not set to an instance of an object
Dusman.Update () (at Assets/Scripts/Dusman.cs:19)".
I didnt try anything because i cant and i dont know how to solve this please help me.
using System.... | https://stackoverflow.com/questions/78461927/unity-2d-platform-game-ai | c#, unity-game-engine, artificial-intelligence, 2d | 1,715,365,034 |
se_2434536 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Support vector machine or artificial neural network for text processing | Support vector machine or artificial neural network for text processing
We need to decide between support vector machines and Fast Artificial Neural Network (FANN. a library) for some text processing project.
It includes contextual spelling correction and then tagging the text to certain phrases and their synonyms.
Wh... | https://stackoverflow.com/questions/2434536/support-vector-machine-or-artificial-neural-network-for-text-processing | artificial-intelligence, machine-learning, neural-network | 1,268,414,685 |
se_78457370 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to create a tensor based on another one - Studying PyTorch in practice? | How to create a tensor based on another one - Studying PyTorch in practice?
I'm studying IA using PyTorch and implementing some toy examples.
First, I created a one-dimensional tensor (X) and a second tensor (y), derived from the first one:
X = torch.arange(0, 100, 1.0).unsqueeze(dim=1)
y = X * 2
So I have something ... | https://stackoverflow.com/questions/78457370/how-to-create-a-tensor-based-on-another-one-studying-pytorch-in-practice | python, numpy, machine-learning, pytorch, artificial-intelligence | 1,715,297,330 |
se_78455702 | stackoverflow | ARTIFICIAL_INTELLIGENCE | PyTorch convolutional autoencoder, output dimensions different from input | PyTorch convolutional autoencoder, output dimensions different from input
I am new with working with PyTorch and wanted to make a simple autoencoder with 255x255 RGB images to play around with it, however the output shape isn't the same as the input shape.
Here's the model
class AutoEncoder(nn.Module):
def __init_... | https://stackoverflow.com/questions/78455702/pytorch-convolutional-autoencoder-output-dimensions-different-from-input | python, pytorch, artificial-intelligence | 1,715,270,916 |
se_78455825 | stackoverflow | ARTIFICIAL_INTELLIGENCE | test=model.predict([text]) entire project runs six times consecutively | test=model.predict([text]) entire project runs six times consecutively
It seems that when the line test=model.predict([text]) is executed, your entire project runs six times consecutively, and when you close the opened windows, it makes predictions.
You can see the code snippets below.
[main file]
print("test1")
def c... | https://stackoverflow.com/questions/78455825/test-model-predicttext-entire-project-runs-six-times-consecutively | python, machine-learning, artificial-intelligence | 1,715,272,294 |
se_78454511 | stackoverflow | ARTIFICIAL_INTELLIGENCE | BucketIterator in Pytorch is putting the batch_size on the torch.shape[1] | BucketIterator in Pytorch is putting the batch_size on the torch.shape[1]
Hello guys I m trying to understand how to make a forward pass on an encoder decoder model with a custom dataset.
I have created a BucketIterator to see how the tensor.shape looks like for a batch of size 64.
train_iterator, valid_iterator, test... | https://stackoverflow.com/questions/78454511/bucketiterator-in-pytorch-is-putting-the-batch-size-on-the-torch-shape1 | python, pytorch, iterator, artificial-intelligence, encoder-decoder | 1,715,258,623 |
se_78453294 | stackoverflow | ARTIFICIAL_INTELLIGENCE | why gradient scaling used in mix-precision training could lead to bigger Learning Rate in float32 model? | why gradient scaling used in mix-precision training could lead to bigger Learning Rate in float32 model?
Background:
Gradient Scaling original is used in mix-precision training like (part of model weights are float16 and part of them are float 32), which its purpose is to reduce underflow of small gradients stored wit... | https://stackoverflow.com/questions/78453294/why-gradient-scaling-used-in-mix-precision-training-could-lead-to-bigger-learnin | machine-learning, nlp, artificial-intelligence, large-language-model | 1,715,244,582 |
se_77607854 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain - ConversationalRetrievalChain with memory and customized prompt | Langchain - ConversationalRetrievalChain with memory and customized prompt
I'm trying to create a ConversationalRetrievalChain to answer based on a specific context provided by a pdf file.
I can get good answers. The issue is that the memory is not working.
The code:
template2 = """
Your name is Bot.
You are a... | https://stackoverflow.com/questions/77607854/langchain-conversationalretrievalchain-with-memory-and-customized-prompt | python, artificial-intelligence, chatbot, langchain, large-language-model | 1,701,794,401 |
se_78444988 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Observation: Python REPL is not a valid tool, try one of [python_repl_ast]. in Langchain | Observation: Python REPL is not a valid tool, try one of [python_repl_ast]. in Langchain
from langchain.agents import initialize_agent
from langchain.llms.fake import FakeListLLM
from langchain.agents import AgentType
from langchain_experimental.tools import PythonAstREPLTool
res = ["Action: Python REPL\nAction Input:... | https://stackoverflow.com/questions/78444988/observation-python-repl-is-not-a-valid-tool-try-one-of-python-repl-ast-in-l | python, artificial-intelligence, langchain, large-language-model | 1,715,114,832 |
se_78446023 | stackoverflow | ARTIFICIAL_INTELLIGENCE | In colab, `ollama serve &` froze running | In colab, `ollama serve &` froze running
I run following sh in colab
!ollama serve &
!ollama run llama3
it out
2024/05/08 03:51:17 routes.go:989: INFO server config env="map[OLLAMA_DEBUG:false OLLAMA_LLM_LIBRARY: OLLAMA_MAX_LOADED_MODELS:1 OLLAMA_MAX_QUEUE:512 OLLAMA_MAX_VRAM:0 OLLAMA_NOPRUNE:false OLLAMA_NUM_PAR... | https://stackoverflow.com/questions/78446023/in-colab-ollama-serve-froze-running | python, jupyter-notebook, artificial-intelligence, google-colaboratory, ollama | 1,715,140,501 |
se_2524129 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How To Design Eurisko | How To Design Eurisko
The program Eurisko was developed by Douglas Lenat in the late 70s and 80s. It's allegedly adept at learning general patterns and heuristics, and at improving it's own performance. Naturally, Lenat has never released the source code, and has published very little information about the exact inner... | https://stackoverflow.com/questions/2524129/how-to-design-eurisko | artificial-intelligence, machine-learning | 1,269,615,160 |
se_78437904 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Minimax for hexapawn game | Minimax for hexapawn game
I'm working on a python minimax implementation for Hexapawn but hit a problem: it prints out the correct move for the ai, but it wont make that move.
This is my code:
import copy
class Hexapawn:
def __init__(self):
self.board = [[2,2,2],
[0,0,0],
... | https://stackoverflow.com/questions/78437904/minimax-for-hexapawn-game | python, artificial-intelligence, minimax | 1,715,012,422 |
se_78420289 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Getting ValueError while trying to train GAN model | Getting ValueError while trying to train GAN model
I am trying to train a GAN model to detect Diabetic retinopathic images but it's throwing error. Kindly help.
The images dataset is not empty I have tried looking into it
Error is:-
Epoch 1/50
Traceback (most recent call last):
File "C:\Users\asus\OneDrive\Desktop\p... | https://stackoverflow.com/questions/78420289/getting-valueerror-while-trying-to-train-gan-model | python, machine-learning, keras, artificial-intelligence, generative-adversarial-network | 1,714,664,394 |
se_78435504 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Problem in defining a ML model for my Npy dataset | Problem in defining a ML model for my Npy dataset
I need help in defining a torch model for my data. I have tried various methods but nothing seems to be working out. Error after error related to input size and shaping. How can I resolve these issues?
import numpy as np
import torch
import torch.nn as nn
import torch.... | https://stackoverflow.com/questions/78435504/problem-in-defining-a-ml-model-for-my-npy-dataset | python, numpy, machine-learning, pytorch, artificial-intelligence | 1,714,985,153 |
se_78440701 | stackoverflow | ARTIFICIAL_INTELLIGENCE | SQL Server database connectivity for read data | SQL Server database connectivity for read data
I have a question regarding database connectivity. I'm attempting to connect my chatbot to a local SQL Server database using "SQL Database Chain" but struggling to establish a successful connection. Despite trying various connection string formats, I haven't had any luck.... | https://stackoverflow.com/questions/78440701/sql-server-database-connectivity-for-read-data | sql-server, artificial-intelligence, chatbot, langchain, flowise | 1,715,065,867 |
se_78434421 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Regarding onehotencoder space cost | Regarding onehotencoder space cost
Why doesn't one-hot encoding use bit-based encoding? Wouldn't it take much less memory? What I mean is when you encode for example four cities you can do it like what one-hot encoder does by expanding one column to 4 or like this in one column:
1st city = 0(base10) = 00000000
... | https://stackoverflow.com/questions/78434421/regarding-onehotencoder-space-cost | python, machine-learning, encoding, artificial-intelligence, one-hot-encoding | 1,714,965,878 |
se_76187088 | stackoverflow | ARTIFICIAL_INTELLIGENCE | I can't load the AI model on web with Roboflow | I can't load the AI model on web with Roboflow
I’m trying to deploy my model on web. But it throws an error “I.map is not a function” when loading the model which is from a Roboflow tutorial. I tried to use the model i trained on Roboflow website and i get the same error. But there's some other model on Robolow is... | https://stackoverflow.com/questions/76187088/i-cant-load-the-ai-model-on-web-with-roboflow | javascript, artificial-intelligence, object-detection, roboflow | 1,683,346,056 |
se_78431349 | stackoverflow | ARTIFICIAL_INTELLIGENCE | error after installing pyttsx3 module in python | error after installing pyttsx3 module in python
import pyttsx3
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voices',voices[0].id)
def speak(audio):
engine.say(audio)
engine.runAndWait()
if __name__ == "__main__":
speak("Hi, I am Veraa")
I was trying to use ... | https://stackoverflow.com/questions/78431349/error-after-installing-pyttsx3-module-in-python | python, machine-learning, artificial-intelligence | 1,714,893,221 |
se_43649359 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Machine Learning Libraries For Android | Machine Learning Libraries For Android
I am trying build a small text mining tool for my android app. I am checking for a machine learning library that will allow me to cluster, classify etc.
Are there any machine learning libraries for android? I came across tensorflow but I need a bit more access to common ML funct... | https://stackoverflow.com/questions/43649359/machine-learning-libraries-for-android | android, machine-learning, nlp, artificial-intelligence, text-mining | 1,493,271,232 |
se_5269789 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Neural Network Artificial Intelligence | Neural Network Artificial Intelligence
In a simple perception, can someone explain to me the concept of the Threshold and and how to set it, i.e. initially what is the value of the Threshold input and weight?? | https://stackoverflow.com/questions/5269789/neural-network-artificial-intelligence | artificial-intelligence, neural-network | 1,299,825,601 |
se_78377688 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Error: 'builtin_function_or_method' object has no attribute '__func__' | Error: 'builtin_function_or_method' object has no attribute '__func__'
First time using LangChain, I'm following a guide and I'm getting this error, does anyone know what might be wrong? I'm using Pinecone along with this, I'm not sure if that makes a difference.
For my Pinecone API environment I'm usi... | https://stackoverflow.com/questions/78377688/error-builtin-function-or-method-object-has-no-attribute-func | python, vector, artificial-intelligence, langchain, embedding | 1,713,954,131 |
se_78419787 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Which DICOM Tag should we use to differentiate between the series? | Which DICOM Tag should we use to differentiate between the series?
We've been working on DICOM datasets for a while and we have the following problem right now. We have been dealing with the Prostate-MRI case and we have the difficulty to distinguish between different DWI series of one study.
The following DICOM Tags ... | https://stackoverflow.com/questions/78419787/which-dicom-tag-should-we-use-to-differentiate-between-the-series | tags, artificial-intelligence, dicom, medical-imaging | 1,714,659,459 |
se_78420830 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Unsloth not detecting CUDA and "str2optimizer32bit" | Unsloth not detecting CUDA and "str2optimizer32bit"
I'm facing issues with Unsloth not detecting CUDA and encountering a "str2optimizer32bit" error. My setup includes an HP Z4 workstation with an Intel Core i7 processor and an NVIDIA 1080Ti GPU, running Ubuntu 22.04. CUDA version is 12.1, and PyTorch version... | https://stackoverflow.com/questions/78420830/unsloth-not-detecting-cuda-and-str2optimizer32bit | python, machine-learning, artificial-intelligence, large-language-model, custom-training | 1,714,671,058 |
se_78424638 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Inconsistent DataFrame Search Results Using LangChain AI Agent | Inconsistent DataFrame Search Results Using LangChain AI Agent
I'm working on a project using a LangChain AI agent to read and query pandas DataFrames. The agent receives detailed instructions in the pre-prompt, including chat history and metadata for the tables. However, I am experiencing troubles with how it reads s... | https://stackoverflow.com/questions/78424638/inconsistent-dataframe-search-results-using-langchain-ai-agent | python, pandas, dataframe, artificial-intelligence, langchain | 1,714,738,566 |
se_78420048 | stackoverflow | ARTIFICIAL_INTELLIGENCE | prediction = model.predict(email_features_array) | prediction = model.predict(email_features_array)
prediction = model.predict(email_features_array)
^^^^^^^^^^^^^
AttributeError: 'numpy.ndarray' object has no attribute 'predict'
i have already built and trained ML Model i only wanna use it through flask, but whenever it's about enter the mode.predic... | https://stackoverflow.com/questions/78420048/prediction-model-predictemail-features-array | python, machine-learning, flask, model, artificial-intelligence | 1,714,662,071 |
se_78409544 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to tune agent _executor for better understanding of the database | How to tune agent _executor for better understanding of the database
I have a database in which I have connected an agent too. However, I have noticed that it sometimes gets confused between whether or not it should return a column ID or persons first name when asked "which person sold the most....?" Is there a way to... | https://stackoverflow.com/questions/78409544/how-to-tune-agent-executor-for-better-understanding-of-the-database | python, artificial-intelligence, langchain, large-language-model | 1,714,490,449 |
se_78419230 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Exception has occurred. Error in accessing saved model | Exception has occurred. Error in accessing saved model
I recieve this error when calling my fine-tuned GPT2 saved model. Exception has occurred: OSError
Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory ./results/checkpoint-21264.
Even though if i run the sam... | https://stackoverflow.com/questions/78419230/exception-has-occurred-error-in-accessing-saved-model | compiler-errors, artificial-intelligence, gpt-2, fine-tuning | 1,714,653,666 |
se_69579043 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can we store additional meta data about a Git repo? | How can we store additional meta data about a Git repo?
With the growing number of microservices, and people moving around projects. It is getting difficult to find someone who supports a service.
Is it possible to put into GitHub enterprise some metadata and who the owners are and the people supporting it?
AI and oth... | https://stackoverflow.com/questions/69579043/how-can-we-store-additional-meta-data-about-a-git-repo | git, github, artificial-intelligence | 1,634,261,872 |
se_78405336 | stackoverflow | ARTIFICIAL_INTELLIGENCE | SSL Error when running Openshift AI Pipeline from code | SSL Error when running Openshift AI Pipeline from code
I made an Elyra Pipeline en Openshift AI and I have submited to pipeline server ok.
I tried to run the pipeline fromPython code:
import os
import kfp_tekton
import os
token = "[my_token]"
route = "[My_projectURL]"
client = kfp_tekton.TektonClient(host=route, exis... | https://stackoverflow.com/questions/78405336/ssl-error-when-running-openshift-ai-pipeline-from-code | artificial-intelligence, openshift, tekton | 1,714,427,619 |
se_78407292 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Speeding up zero-shot headline categorization with BART on Huggingface | Speeding up zero-shot headline categorization with BART on Huggingface
I’m working on a Flask web app that needs to categorize 300 headlines into 9-16 dynamic categories every hour very quickly. I'm using the Facebook BART model via Huggingface's API. My current implementation in Python takes 3-5 seconds per headline,... | https://stackoverflow.com/questions/78407292/speeding-up-zero-shot-headline-categorization-with-bart-on-huggingface | python, artificial-intelligence, classification, text-classification, huggingface | 1,714,466,417 |
se_78298983 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Speech-to-text functionality functions properly in the local environment but encounters network issues in the client's environment | Speech-to-text functionality functions properly in the local environment but encounters network issues in the client's environment
Speech-to-text functions smoothly in the local environment but faces network errors in the azure virtual desktop. I've verified all browser permissions, and everything appears to be in... | https://stackoverflow.com/questions/78298983/speech-to-text-functionality-functions-properly-in-the-local-environment-but-enc | javascript, artificial-intelligence, azure-virtual-machine | 1,712,670,951 |
se_78404407 | stackoverflow | ARTIFICIAL_INTELLIGENCE | dspy-ai==2.4.5 dependency issues with instructor library | dspy-ai==2.4.5 dependency issues with instructor library
I am trying to install dspy-ai==2.4.5 which needs pydantic version 2.5.0 along with instructor library which needs minimum pydantic version 2.7.0. I am using poetry for dependency management.
Following is an issue I am facing:
Because no versions of instructor m... | https://stackoverflow.com/questions/78404407/dspy-ai-2-4-5-dependency-issues-with-instructor-library | artificial-intelligence, dependency-management, pydantic, python-poetry, dspy | 1,714,413,363 |
se_78401962 | stackoverflow | ARTIFICIAL_INTELLIGENCE | RAG model chat history does not work properly | RAG model chat history does not work properly
I am currently trying to develop a sample project by learning RAG. In this code, I aim to chat with a document in Pinecone and while doing this, I try to keep the spoken conversations. These chat histories are successfully kept in a list. But when I want to ask the model s... | https://stackoverflow.com/questions/78401962/rag-model-chat-history-does-not-work-properly | python, artificial-intelligence, langchain, pinecone, retrieval-augmented-generation | 1,714,385,427 |
se_78398872 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to Convert 16:9 Video to 9:16 Ratio While Ensuring Speaker Presence in Frame? | How to Convert 16:9 Video to 9:16 Ratio While Ensuring Speaker Presence in Frame?
I am tried so many time to figure out the problem in detecting the face and also it's not so smooth enough to like other tools out there.
So basically I am using python and Yolo in this project but I want the person who is talking and wh... | https://stackoverflow.com/questions/78398872/how-to-convert-169-video-to-916-ratio-while-ensuring-speaker-presence-in-frame | python, ffmpeg, artificial-intelligence, moviepy, yolov5 | 1,714,321,451 |
se_78396036 | stackoverflow | ARTIFICIAL_INTELLIGENCE | sliding-tile problem using hill climbing algorithm | sliding-tile problem using hill climbing algorithm
I am trying to solve the 8 puzzle or sliding tile problem using Hill-Climbing algorithm in python. I Wrote the code to print each intermediate step until goal node is reached but no output is shown by the interpreter. Please review my code and tell me about the errors... | https://stackoverflow.com/questions/78396036/sliding-tile-problem-using-hill-climbing-algorithm | python, artificial-intelligence, sliding-tile-puzzle, hill-climbing | 1,714,243,640 |
se_78378560 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ValueError: Input X contains NaN. SVR does not accept missing values encoded as NaN natively | ValueError: Input X contains NaN. SVR does not accept missing values encoded as NaN natively
I use SVR to predict my data
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.svm import SVR
from sklearn.model_selection import GridSearchCV
from sklearn.model_selection import KFold
from sk... | https://stackoverflow.com/questions/78378560/valueerror-input-x-contains-nan-svr-does-not-accept-missing-values-encoded-as | python, machine-learning, artificial-intelligence, prediction | 1,713,962,658 |
se_78393841 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to read seven segment display and logos in images using Python? | How to read seven segment display and logos in images using Python?
I have a bunch of photos of energy meters. In every photo there is info written on the meter and also a seven segment display which has reading in kWh. Also, there is logo of meter manufacturer. I want to extract information like meter serial number, ... | https://stackoverflow.com/questions/78393841/how-to-read-seven-segment-display-and-logos-in-images-using-python | python, machine-learning, image-processing, artificial-intelligence, ocr | 1,714,193,499 |
se_78388600 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to prevent an AI model from generating its own answers outside of a predefined corpus? | How to prevent an AI model from generating its own answers outside of a predefined corpus?
so I'm developing a chatbot using Python. I integrated a vector database called Word2Vec, and I'm using the Zephyr model from Hugging Face. I have created a very simple text file corpus, and I want my model to go through this co... | https://stackoverflow.com/questions/78388600/how-to-prevent-an-ai-model-from-generating-its-own-answers-outside-of-a-predefin | python, artificial-intelligence, chatbot, huggingface-transformers, gensim | 1,714,112,697 |
se_78271686 | stackoverflow | ARTIFICIAL_INTELLIGENCE | "Text Input in Streamlit Removes Entered Text Upon Hitting Enter Key: How to Fix?" | "Text Input in Streamlit Removes Entered Text Upon Hitting Enter Key: How to Fix?"
the input stored in user_question i need when press enter the txt in textbox getting clear and the output displing what can i did i tried js and streamlit function but when enter input and press send btn or press enter no outp... | https://stackoverflow.com/questions/78271686/text-input-in-streamlit-removes-entered-text-upon-hitting-enter-key-how-to-fix | python, nlp, artificial-intelligence, streamlit, large-language-model | 1,712,205,118 |
se_78385859 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AWS Bedrock Agent Access Denied with Claude 3 | AWS Bedrock Agent Access Denied with Claude 3
I'm using AWS Bedrock with Pinecone as my vector database, and with Claude 2.1, it works smoothly. Still, when I try to update it (or create a new one) using the recently enabled Claude 3.0 Haiku or Sonnet, it triggers the following error:
There are no Advanced Prompts co... | https://stackoverflow.com/questions/78385859/aws-bedrock-agent-access-denied-with-claude-3 | amazon-s3, artificial-intelligence, pinecone, amazon-bedrock, claude | 1,714,060,758 |
se_76433942 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Problem with API-Implementation for elevenlabs with a valid API-Key | Problem with API-Implementation for elevenlabs with a valid API-Key
I don't have a big background in programming so I'd like to ask for your help. I have the following code below in python. However the output tells me that the API key is invalid (by the way I already checked and it is valid). I think it might have to ... | https://stackoverflow.com/questions/76433942/problem-with-api-implementation-for-elevenlabs-with-a-valid-api-key | python, artificial-intelligence, text-to-speech | 1,686,241,648 |
se_78354052 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Trying to deploy a Custom Model into OpenSearch throws a RuntimeError: KeyError: token_type_ids | Trying to deploy a Custom Model into OpenSearch throws a RuntimeError: KeyError: token_type_ids
For a specific use case, I had to deploy a custom model into OpenSearch, First of the all, I exported a HuggingFace Model into TorchScript and had registered successfully then I tried to deploy it but unfortunately deploy o... | https://stackoverflow.com/questions/78354052/trying-to-deploy-a-custom-model-into-opensearch-throws-a-runtimeerror-keyerror | machine-learning, artificial-intelligence, large-language-model, opensearch, huggingface | 1,713,533,778 |
se_58911784 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to understand the 4 steps of Monte Carlo Tree Search | How to understand the 4 steps of Monte Carlo Tree Search
From many blogs and this one https://web.archive.org/web/20160308070346/http://mcts.ai/about/index.html
We know that the process of MCTS algorithm has 4 steps.
Selection: Starting at root node R, recursively select optimal child nodes until a leaf node L ... | https://stackoverflow.com/questions/58911784/how-to-understand-the-4-steps-of-monte-carlo-tree-search | algorithm, search, artificial-intelligence, monte-carlo-tree-search | 1,574,070,468 |
se_74636811 | stackoverflow | ARTIFICIAL_INTELLIGENCE | [Pytorch]Error when using DistributedDataParallel in the broadcasting stage of initialization | [Pytorch]Error when using DistributedDataParallel in the broadcasting stage of initialization
I'm currently working on GroupFormer which used DistributedDataParallel for trainning. The error message is listed below and it shows that the error is caused by tensor size mismatch while broadcasting in the initialization s... | https://stackoverflow.com/questions/74636811/pytorcherror-when-using-distributeddataparallel-in-the-broadcasting-stage-of-i | pytorch, computer-vision, artificial-intelligence, distributed-training | 1,669,867,223 |
se_78378193 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why do I get "inf" values after replacing NaN values in my dataset with the mean or median? | Why do I get "inf" values after replacing NaN values in my dataset with the mean or median?
I'm using Python and I have a dataset containing NaN values. To clean up these data, I replaced the NaN values with the mean or median of each column using the fillna() function from pandas. However, after this operat... | https://stackoverflow.com/questions/78378193/why-do-i-get-inf-values-after-replacing-nan-values-in-my-dataset-with-the-mean | python, machine-learning, dataset, artificial-intelligence, data-preprocessing | 1,713,959,141 |
se_17368816 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Probabalistic String Matching in Python | Probabalistic String Matching in Python
I'm in the process of writing a bot that places bets on the website Betfair using their Python API. I want to place bets on football (soccer) matches when they are in-play.
I've coded an XML feed to give me live data from the games, however the XML feed doesn't always use the s... | https://stackoverflow.com/questions/17368816/probabalistic-string-matching-in-python | python, algorithm, artificial-intelligence, probability, string-matching | 1,372,434,823 |
se_78370567 | stackoverflow | ARTIFICIAL_INTELLIGENCE | I am not getting source documents from RetrievalQA.from_chain_type when I have deployed it in azure while I am getting it locally | I am not getting source documents from RetrievalQA.from_chain_type when I have deployed it in azure while I am getting it locally
Query returned from azure:
{'query': 'Please provide rationale.. ', 'result': 'Creative Output:
The rationale behind the process is to ensure that all actions taken
are based on sound reas... | https://stackoverflow.com/questions/78370567/i-am-not-getting-source-documents-from-retrievalqa-from-chain-type-when-i-have-d | python-3.x, artificial-intelligence, langchain, huggingface, azure-openai | 1,713,857,276 |
se_78368077 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Stable Diffusion 1.5 Inpaint + Lora Fine-Tuning (result not as expected) | Stable Diffusion 1.5 Inpaint + Lora Fine-Tuning (result not as expected)
I'm trying to do inpainting with a subject that a lora has been trained on. Since the base model is not doing well with inpainting I tried to load a controlnet that is used for inpainting.
Conrolnet inpainting: lllyasviel/control_v11p_sd15_inpain... | https://stackoverflow.com/questions/78368077/stable-diffusion-1-5-inpaint-lora-fine-tuning-result-not-as-expected | artificial-intelligence, stable-diffusion, inpainting | 1,713,808,286 |
se_77989391 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I extract data from a document using the OpenAI API? | How do I extract data from a document using the OpenAI API?
I want to extract key terms from rental agreements.
To do this, I want to send the PDF of the contract to an AI service that must return some key terms in JSON format.
What are some of the different libraries and companies that can do this? So far, I've explo... | https://stackoverflow.com/questions/77989391/how-do-i-extract-data-from-a-document-using-the-openai-api | python, artificial-intelligence, openai-api, openai-assistants-api | 1,707,840,812 |
se_78365846 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Text conversion processing and extracting information | Text conversion processing and extracting information
I have a call center software which consist of industry specific calls, in which all calls are recorded and then all calls transform into text. After transforming into text, every calls is passed to other agent who is human, who extract all information from text. I... | https://stackoverflow.com/questions/78365846/text-conversion-processing-and-extracting-information | python, nlp, bots, artificial-intelligence | 1,713,784,630 |
se_78299902 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Next.js AI SDK Generative UI with Together AI and Mixtral 8x7B not working with function calling | Next.js AI SDK Generative UI with Together AI and Mixtral 8x7B not working with function calling
I'm trying to make a AI to generate UI components based on the user input such as vercel did in their latest chat example here. Mixtral supports function calling but it seems that it is not working as it should with the re... | https://stackoverflow.com/questions/78299902/next-js-ai-sdk-generative-ui-with-together-ai-and-mixtral-8x7b-not-working-with | node.js, next.js, artificial-intelligence, vercel | 1,712,680,004 |
se_78364403 | stackoverflow | ARTIFICIAL_INTELLIGENCE | SpaCy fine-tuning GPU | SpaCy fine-tuning GPU
I train a text classifier with spaCy and classy classification. But the model does not use gpu during training, fine-tuning is very long
GPU info
$ nvidia-smi
Mon Apr 22 09:41:13 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 54... | https://stackoverflow.com/questions/78364403/spacy-fine-tuning-gpu | machine-learning, pytorch, artificial-intelligence, spacy | 1,713,768,429 |
se_78362405 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Car around the track | Car around the track
I have wrote the code to achieve the AI to learn how to do a lap on its own. For that, I have used Pygame and NEAT.
When training the AI, the program can only take 4 decisions:
Forward
Right
Left
Nothing (moves it a bit forward, otherwise I got stuck with some genomes not moving at all)
The data... | https://stackoverflow.com/questions/78362405/car-around-the-track | python, artificial-intelligence, neat | 1,713,718,283 |
se_78362630 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to fix a TypeError in this tensorflow code? | How to fix a TypeError in this tensorflow code?
The code:
import tensorflow as tf
from tensorflow import keras
fashion_mnist = keras.datasets.fashion_mnist
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
model = keras.Sequential([
keras.layers.Flatten(input_shape = (28,28)),... | https://stackoverflow.com/questions/78362630/how-to-fix-a-typeerror-in-this-tensorflow-code | python, tensorflow, keras, deep-learning, artificial-intelligence | 1,713,722,208 |
se_78360240 | stackoverflow | ARTIFICIAL_INTELLIGENCE | When use onnxruntime c++, it raise err "Available memory of 0 is smaller than requested bytes of 256" | When use onnxruntime c++, it raise err "Available memory of 0 is smaller than requested bytes of 256"
I use following code
#include <iostream>
#include <onnxruntime_cxx_api.h>
#include "filesystem"
#include <opencv2/opencv.hpp>
#include <opencv2/dnn/dnn.hpp>
namespace fs = std::filesystem;
int main() {
... | https://stackoverflow.com/questions/78360240/when-use-onnxruntime-c-it-raise-err-available-memory-of-0-is-smaller-than-re | c++, artificial-intelligence, onnxruntime | 1,713,666,983 |
se_78361080 | stackoverflow | ARTIFICIAL_INTELLIGENCE | I tryna run this Python file to let a minesweeper game solves itself but it didn't | I tryna run this Python file to let a minesweeper game solves itself but it didn't
I was assigned a group project in Intro to AI course at uni.
The topic was: "implement an AI to play a puzzle game by itself using a blind search algo and a heuristic search algo."
The required programming language is Python. If me ... | https://stackoverflow.com/questions/78361080/i-tryna-run-this-python-file-to-let-a-minesweeper-game-solves-itself-but-it-didn | python, python-3.x, artificial-intelligence, depth-first-search, minesweeper | 1,713,693,091 |
se_78208684 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Keras issue with layers compability | Keras issue with layers compability
Here is an exception:
2024-03-22 22:20:40.503162: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment var... | https://stackoverflow.com/questions/78208684/keras-issue-with-layers-compability | python, tensorflow, keras, artificial-intelligence, tf.keras | 1,711,139,103 |
se_78359387 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Alpha-Beta pruning minimax Checkers | Alpha-Beta pruning minimax Checkers
This is my AI to play checkers using Minimax and Alpha-beta pruning; however, it seems like the AI which use Alpha-Beta pruning has worse decisions than the one which does not have alpha-beta pruning. My best assumptions are that alpha-beta pruning cut some cases that might seem bad... | https://stackoverflow.com/questions/78359387/alpha-beta-pruning-minimax-checkers | python-3.x, artificial-intelligence, minimax, alpha-beta-pruning, game-ai | 1,713,639,476 |
se_78300721 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is it possible to add buttons that have an instant question for FlowiseAI's chatbot | Is it possible to add buttons that have an instant question for FlowiseAI's chatbot
I love FlowiseAI but I'm not sure where I can ask this question. Is it possible to add buttons that have an instant question? Such as "What are your business hours" or "Do you have any specials" to a FlowiseChatbot. It would be... | https://stackoverflow.com/questions/78300721/is-it-possible-to-add-buttons-that-have-an-instant-question-for-flowiseais-chat | artificial-intelligence, chatbot, flowise | 1,712,691,121 |
se_78353007 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to make only words (not sentences) in SRT file by AssemblyAI | How to make only words (not sentences) in SRT file by AssemblyAI
Okay... So Im trying to create a video making program thing and I'm basically finished but I wanted to change 1 key thing and don't know how to...
Here's the code:
import assemblyai as aai
import colorama
from colorama import *
import time
import os
aai... | https://stackoverflow.com/questions/78353007/how-to-make-only-words-not-sentences-in-srt-file-by-assemblyai | python, artificial-intelligence, speech-recognition, srt | 1,713,522,490 |
se_66022629 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How UNET is different from simple autoencoders? | How UNET is different from simple autoencoders?
UNET architecture is like first half encoder and second half decoder . There are different variations of autoencoders like sparse , variational etc. They all compress and decompress the data But the UNET is also same used for compressing and decompressing . To my extent ... | https://stackoverflow.com/questions/66022629/how-unet-is-different-from-simple-autoencoders | deep-learning, artificial-intelligence, autoencoder, semantic-segmentation, unet-neural-network | 1,612,335,436 |
se_78350648 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Saving subclassed model in Keras | Saving subclassed model in Keras
I want to save my model for deployment and it sounds like it's not possible for subclassed model.
what do you recommend me to do?
batch = next(iter(val_ds))
idx_to_char = vectorizer.get_vocabulary()
display_cb = DisplayOutputs(batch, idx_to_char, target_start_token_idx=2, target_end_... | https://stackoverflow.com/questions/78350648/saving-subclassed-model-in-keras | tensorflow, keras, artificial-intelligence | 1,713,481,215 |
se_78348188 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Pytorch dtype help need | Pytorch dtype help need
#i got this csv file from kaggle(https://www.kaggle.com/datasets/keplersmachines/kepler-labelled-time-series-#data?resource=download)
train_df = pd.read_csv("../csvs/Space Travel/Exoplanet Hunting in Deep Space/1/exoTrain.csv")
test_df = pd.read_csv("../csvs/Space Travel/Exoplanet Hunting in De... | https://stackoverflow.com/questions/78348188/pytorch-dtype-help-need | types, pytorch, artificial-intelligence, dtype | 1,713,449,883 |
se_78330777 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Trouble converting RAG method code meant for Sagemaker in AWS Lambda | Trouble converting RAG method code meant for Sagemaker in AWS Lambda
We're having an issue converting the RAG method to Lambda code.
We're following this jupyter notebook: https://github.com/pinecone-io/examples/blob/master/learn/generation/aws/sagemaker/sagemaker-llama-2-rag.ipynb
Here's some snippets from the code f... | https://stackoverflow.com/questions/78330777/trouble-converting-rag-method-code-meant-for-sagemaker-in-aws-lambda | python, aws-lambda, artificial-intelligence, aws-api-gateway, amazon-sagemaker | 1,713,211,181 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.