Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
script
- Page 1
Question Answering with YouTube Videos Using RAG in LangChain
Programming
Computer Science
5 Days Ago
by usmanmalik57
… to the user prompt and chat history. The following
script
defines the `history_retriever_chain`. ``` prompt = ChatPromptTemplate.from_messages([ MessagesPlaceholder…query), AIMessage(content = response)]) return response ``` The following
script
executes a `while` loop. Inside the loop, the user…
Paris Olympics Chatbot- Get Ticket Information Using Chat-GPT and LangChain
Programming
Computer Science
3 Weeks Ago
by usmanmalik57
…openai !pip install pypdf !pip install faiss-cpu ``` The
script
below imports required libraries. ``` from langchain_openai import ChatOpenAI from … responses without using the `content` attribute, as shown in the
script
below. ``` output_parser = StrOutputParser() chain = prompt | llm | output_parser result = …
Paris Olympics Ticket Information Chatbot with Memory Using LangChain
Programming
Computer Science
3 Weeks Ago
by usmanmalik57
…history, we can test our `retrieval_chain` using the following
script
. ``` retrieval_chain = create_retrieval_chain(history_retriever_chain, document_chain) result = …to generate a chatbot response. Here is the
script
and a sample output. ``` print("=======================================================================")…
How Build video-player in html And css ?
Programming
2 Weeks Ago
by Kirubel_2
…</h2> </div> </div> <
script
> function un(){ x=document.getElementById("like").style…="initial"; } } </
script
> <
script
src="../js/
script
.js"></
script
> <
script
src="../js/img.js…
Using Natural Language to Query SQL Databases with Python LangChain Module
Programming
Computer Science
1 Week Ago
by usmanmalik57
… must install the PostGreSQL and MySQL connectors. Execute the following
script
to download these connectors. ``` # connector for PostgreSQL !pip ….png](https://static.daniweb.com/attachments/4/f98c2491a5b15f1e5c88e4f7db8b74ae.png) The
script
below returns the final output: ``` print(response['output']) ``` **Output:** ```…
How can I upload a tar.bz2 file to openstack swift object storage container
Programming
Software Development
3 Weeks Ago
by Hanginium65
…’ object having no attribute ‘read’ after running my
script
. when it comes to the compressed file that ends with… extension .tar.bz2. I’ve included the Python
script
and the errors I got after running it. Please… obj2) Below is the error I got after running the
script
. Python Traceback (most recent call last): File "/opt…
How Build Html form ?
Programming
2 Weeks Ago
by Kirubel_2
…gt;</center> </div> <
script
type="text/javascript"> // Function to … function togglePopup() { $(".content").toggle(); } </
script
> </div> </form> <…
Re: AirTM API: How to Build a Form?
Programming
Web Development
3 Weeks Ago
by pritaeas
You cannot safely use a form to post directly to AirTM. Post to your own PHP
script
, which can then use curl to make the request, including headers.
Re: Things I hate about TV shows
Community Center
Geeks' Lounge
3 Weeks Ago
by KomalBhatt
… the story and makes me wish I could write the
script
myself. And don't even get me started on those…
Re: How Build video-player in html And css ?
Programming
2 Weeks Ago
by Kirubel_2
body{ /* background: url(../img/w11.png); */ background: url(../img/m.jpg); background-size: cover; background-repeat: no-repeat; margin: 0; padding: 0; height: 101vh; overflow-y: hidden; } .container button{ background: transparent; …
Re: How can I upload a tar.bz2 file to openstack swift object storage container
Programming
Software Development
3 Weeks Ago
by Salem
First, let's prepare two tar files using different compression schemes for demo purposes. $ cat foo_1.txt This is file 1 $ cat foo_2.txt This is file 2 This is file two This is file too # Three tar files, two compressed and one uncompressed for reference $ tar -j -c -f foo.tar.bz2 foo_1.txt foo_2.txt…
Re: How can I upload a tar.bz2 file to openstack swift object storage container
Programming
Software Development
3 Weeks Ago
by Hanginium65
Good day, Salem. My apologies for taking so long to reply to your suggestion. I refactored my code to read the contents of the tar.bz2 file and then pass them as a file-like object to the 'put_object' and also to change the content type for the file transfer to "application/octet-stream". The first was sent through to object storage …
Re: How can I upload a tar.bz2 file to openstack swift object storage container
Programming
Software Development
3 Weeks Ago
by Salem
I don't understand why you need to extract all the files from the compressed `tar.bz2` just to upload to a backup. Also, line 69 is now meaningless having just posted only a snippet of the code. Before the error, what was the last `logger.info` message?
Fine Tuning Google Gemma Model for Text Classification in Python
Programming
Computer Science
1 Month Ago
by usmanmalik57
… without ado. ## Installing and Importing Required Libraries ## The following
script
installs libraries required to run scripts in this article. ``` !pip3…load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.bfloat16 ) ``` The
script
below imports the Gemma 2b tokenizer and model. You can…
Retrieval Augmented Generation (RAG) with Google Gemma From HuggingFace
Programming
Computer Science
1 Month Ago
by usmanmalik57
…!pip install kaggle !pip install huggingface-hub ``` The
script
below imports required libraries. ``` from langchain.text_splitter import … = RecursiveCharacterTextSplitter( chunk_size=1000, chunk_overlap=200, length_function=len ) ``` The
script
below divides all the documents into text chunks using the…
Comparing Google Gemini Pro with OpenAI GPT-4 for Zero-Shot Classification
Programming
Computer Science
2 Months Ago
by usmanmalik57
…/general/custom-service-account) and API Key information. The following
script
does that. ``` os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = "PATH_TO_VERTEX_AI_SERVICE_ACCOUNT JSON…, we can evaluate the model's performance using the following
script
. ``` accuracy = accuracy_score(all_sentiments, dataset["sentiment"]) …
Claude 3 Opus Vs. Google Gemini Vs. GPT-4 for Zero-Shot Text Classification
Programming
Computer Science
1 Month Ago
by usmanmalik57
…Importing and Installing Required Libraries The following
script
installs the corresponding APIs for importing Claude…google-cloud-aiplatform !pip install openai ``` The
script
below imports the required libraries. ``` import …` column contains sentiment labels. The following
script
imports the dataset, prints the dataset shape…
7 NLP Tasks to Perform for Free in Python with Mistral 7b LLM
Programming
Computer Science
1 Month Ago
by usmanmalik57
… without further ado. ## Importing and Installing Required Libraries The following
script
installs the libraries required to run scripts in this article… the libraries are pre-installed in the environment. The following
script
imports the required libraries. ``` from transformers import AutoModelForCausalLM, AutoTokenizer, logging…
PDF Image Table Extractor Web App with Google Gemini Pro and Streamlit
Programming
Computer Science
2 Months Ago
by usmanmalik57
…, you will need to install the `streamlit` library. The following
script
installs these libraries: ``` google-cloud-aiplatform streamlit ``` ## Creating Google…code snippets for improved readability. ### Import Required Libraries ### The following
script
imports required libraries for the `main.py` file. ``` from …
Extract Tabular Data from PDF Images using Hugging Face Table Transformer
Programming
Computer Science
1 Month Ago
by usmanmalik57
…unzip roboto.zip -d ./roboto ``` The following
script
imports the required libraries into your application. ``` from… Importing and Converting PDF to Image The following
script
defines the `pdf_to_img()` function that converts PDF…this image. ### Detecting Tables The following
script
imports the preprocessor and model objects for …
Converting PDF Image to CSV Using Multimodal Google Gemini Pro
Programming
Computer Science
2 Months Ago
by usmanmalik57
…can install the Google Cloud API via the following
script
installs. ``` pip install --upgrade google-cloud-aiplatform… get free credits worth $300. The following
script
imports the required libraries into our application. ```…writerow(processed_line) ``` Once you execute the above
script
, you will see the following CSV file in …
GCC Fails to Recognize Parameters
Programming
1 Month Ago
by snah19
…, and it's failing to recognize certain parameters and the
script
I used to build FFmpeg source code follows: #!/usr/bin…
Re: DomContentLoaded vs jQuery Ready fn
Programming
Web Development
1 Month Ago
by toneewa
…/jquery-3.6.0.min.js"></
script
> <
script
> function benchmarkJQueryReady() { var startTime = performance…lt;title>Page Loading Benchmark</title> <
script
> function benchmarkDomContentLoaded() { var startTime = performance.now();…
Re: Seeking Help for Creating a Circle Generator Tool
Programming
Game Development
2 Months Ago
by jackwells
…;circle"></div> <
script
src="
script
.js"></
script
> </body> </html>…
Re: How Do I address ERROR: access violation writing 0x0000000000005140,
Programming
Web Development
1 Month Ago
by rproffitt
… mine I'd place a logging command in my python
script
at each step so I could nail down which line…
Why am getting different syntax errors when running a Python script
Programming
Software Development
2 Months Ago
by Tom_45
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 program. Here is the problem code: matches = re.findall('<…
Re: Why am getting different syntax errors when running a Python script
Programming
Software Development
2 Months Ago
by Tom_45
After I posted this question I noticed that I was missing the raw string indicator and the capture group enclosing parenthesis on the findall, which explains the subscripting error. So, hold off on the answers for now. I'm still having other issues with multiple file runs, though.
Re: Why am getting different syntax errors when running a Python script
Programming
Software Development
2 Months Ago
by Tom_45
Finished the assignment and was able to work out the bugs I was encountering. In addition to the issues I mentioned in my last reply, I had several instances of not indenting properly so that statements like exit() were not executing because their indention made them part of an if statement.
Re: Track Faces from Videos with Margins Using Deep Learning in Python
Programming
Computer Science
2 Months Ago
by EdwardMatthew
It's fantastic, I have read this article and it is super amazing. thankyou for the knowledge.
Re: Fine-Tuning OpenAI Whisper Model for Audio Classification in PyTorch
Programming
Computer Science
2 Months Ago
by habi_2
how to use the best_model.pt
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC