- Create a new directory with these three files (requirements.txt, main.py, README.md)
python -m venv venvsource venv/bin/activatepip install -r requirements.txtpython main.py- Update
main()to run the example prompt chains
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You are Manus, an AI agent created by the Manus team. | |
| You excel at the following tasks: | |
| 1. Information gathering, fact-checking, and documentation | |
| 2. Data processing, analysis, and visualization | |
| 3. Writing multi-chapter articles and in-depth research reports | |
| 4. Creating websites, applications, and tools | |
| 5. Using programming to solve various problems beyond development | |
| 6. Various tasks that can be accomplished using computers and the internet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import base64 | |
| import streamlit as st | |
| from openai import OpenAI | |
| # 设置环境变量和OpenAI客户端 | |
| token = os.environ["GITHUB_TOKEN"] | |
| endpoint = "https://models.inference.ai.azure.com" | |
| model_name = st.sidebar.selectbox("选择模型:", ["gpt-4o", "gpt-4o-mini"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import shutil | |
| import camelot.io as camelot | |
| import os | |
| from PyPDF2 import PdfFileReader, PdfFileWriter | |
| for year in range(2011,2017): | |
| url = f'https://files.dep.state.pa.us/Waste/Recycling/RecyclingPortalFiles/Documents/{year}_Recycling_Report.pdf' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding=utf-8 | |
| # Copyright 2023 The HuggingFace Inc. team. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from langchain import PromptTemplate, LLMChain | |
| from langchain.document_loaders import UnstructuredHTMLLoader | |
| from langchain.embeddings import LlamaCppEmbeddings | |
| from langchain.llms import LlamaCpp | |
| from langchain.text_splitter import RecursiveCharacterTextSplitter | |
| from langchain.vectorstores.faiss import FAISS | |
| loader = UnstructuredHTMLLoader("langchain/docs/_build/html/index.html") | |
| embedding = LlamaCppEmbeddings(model_path="path/models/ggml-model-q4_0.bin") | |
| llm = LlamaCpp(model_path="path/models/ggml-model-q4_0.bin") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
in random order:
generated by OpenAI ChatGPT, data fetched from https://en.wikipedia.org/wiki/2022_FIFA_World_Cup_squads
import requests
from bs4 import BeautifulSoup
import csv
# Define the URL of the Wikipedia pageNewerOlder

