diff --git a/spaces/101-5/gpt4free/app.py b/spaces/101-5/gpt4free/app.py deleted file mode 100644 index 23e3a59d76381e8f30904722f52f1ac57285a006..0000000000000000000000000000000000000000 --- a/spaces/101-5/gpt4free/app.py +++ /dev/null @@ -1,172 +0,0 @@ -import g4f -import gradio as gr -from g4f.Provider import ( - Ails, - You, - Bing, - Yqcloud, - Theb, - Aichat, - Bard, - Vercel, - Forefront, - Lockchat, - Liaobots, - H2o, - ChatgptLogin, - DeepAi, - GetGpt -) -import os -import json -import pandas as pd - -from models_for_langchain.model import CustomLLM -from langchain.memory import ConversationBufferWindowMemory, ConversationTokenBufferMemory -from langchain import LLMChain, PromptTemplate -from langchain.prompts import ( - ChatPromptTemplate, - PromptTemplate, - SystemMessagePromptTemplate, - AIMessagePromptTemplate, - HumanMessagePromptTemplate, -) - -provider_dict = { - 'Ails': Ails, - 'You': You, - 'Bing': Bing, - 'Yqcloud': Yqcloud, - 'Theb': Theb, - 'Aichat': Aichat, - 'Bard': Bard, - 'Vercel': Vercel, - 'Forefront': Forefront, - 'Lockchat': Lockchat, - 'Liaobots': Liaobots, - 'H2o': H2o, - 'ChatgptLogin': ChatgptLogin, - 'DeepAi': DeepAi, - 'GetGpt': GetGpt -} - -prompt_set_list = {} -for prompt_file in os.listdir("prompt_set"): - key = prompt_file - if '.csv' in key: - df = pd.read_csv("prompt_set/" + prompt_file) - prompt_dict = dict(zip(df['act'], df['prompt'])) - else: - with open("prompt_set/" + prompt_file, encoding='utf-8') as f: - ds = json.load(f) - prompt_dict = {item["act"]: item["prompt"] for item in ds} - prompt_set_list[key] = prompt_dict - -with gr.Blocks() as demo: - llm = CustomLLM() - - template = """ - Chat with human based on following instructions: - ``` - {system_instruction} - ``` - The following is a conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know. - {{chat_history}} - Human: {{human_input}} - Chatbot:""" - - memory = ConversationBufferWindowMemory(k=10, memory_key="chat_history") - - chatbot = gr.Chatbot([], label='AI') - msg = gr.Textbox(value="", label='请输入:') - with gr.Row(): - clear = gr.Button("清空对话", scale=2) - chat_mode = gr.Checkbox(value=True, label='聊天模式', interactive=True, scale=1) - system_msg = gr.Textbox(value="你是一名助手,可以解答问题。", label='系统提示') - with gr.Row(): - default_prompt_set = "1 中文提示词.json" - prompt_set_name = gr.Dropdown(prompt_set_list.keys(), value=default_prompt_set, label='提示词集合') - prompt_name = gr.Dropdown(prompt_set_list[default_prompt_set].keys(), label='提示词', min_width=20) - with gr.Row(): - model_name = gr.Dropdown(['gpt-3.5-turbo', 'gpt-4'], value='gpt-3.5-turbo', label='模型') - provider_name = gr.Dropdown(provider_dict.keys(), value='GetGpt', label='提供者', min_width=20) - - def change_prompt_set(prompt_set_name): - return gr.Dropdown.update(choices=list(prompt_set_list[prompt_set_name].keys())) - - def change_prompt(prompt_set_name, prompt_name): - return gr.update(value=prompt_set_list[prompt_set_name][prompt_name]) - - def user(user_message, history = []): - return gr.update(value="", interactive=False), history + [[user_message, None]] - - def bot(history, model_name, provider_name, system_msg, chat_mode): - history[-1][1] = '' - if len(system_msg)>3000: - system_msg = system_msg[:2000] + system_msg[-1000:] - - if not chat_mode: - global template, memory - llm.model_name = model_name - llm.provider_name = provider_name - prompt = PromptTemplate( - input_variables=["chat_history", "human_input"], template=template.format(system_instruction=system_msg) - ) - llm_chain = LLMChain( - llm=llm, - prompt=prompt, - verbose=False, - memory=memory, - ) - bot_msg = llm_chain.run(history[-1][0]) - for c in bot_msg: - history[-1][1] += c - yield history - else: - prompt = """ - 请你仔细阅读以下提示,然后针对用户的话进行回答。 - 提示: - ``` - {} - ``` - 用户最新的话: - ``` - {} - ``` - 请回答: - """ - - # print(history) - messages = [] - for user_message, assistant_message in history[:-1]: - messages.append({"role": "user", "content": user_message}) - messages.append({"role": "assistant", "content": assistant_message}) - messages.append({"role": "user", "content": history[-1][0]}) - # print(messages) - - bot_msg = g4f.ChatCompletion.create( - model=model_name, - provider=provider_dict[provider_name], - messages=messages, - stream=True) - for c in bot_msg: - history[-1][1] += c - print(c, flush=True, end='') - yield history - - def empty_chat(): - global memory - memory = ConversationBufferWindowMemory(k=10, memory_key="chat_history") - return None - response = msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then( - bot, [chatbot, model_name, provider_name, system_msg, chat_mode], chatbot - ) - prompt_set_name.select(change_prompt_set, prompt_set_name, prompt_name) - prompt_name.select(change_prompt, [prompt_set_name, prompt_name], system_msg) - - response.then(lambda: gr.update(interactive=True), None, [msg], queue=False) - clear.click(empty_chat, None, [chatbot], queue=False) - -demo.title = "AI Chat" -demo.queue() -demo.launch() \ No newline at end of file diff --git a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/ArcGIS 10.8 Full Crack Kuyhaa - A Powerful and Easy-to-Use GIS Software for Your PC.md b/spaces/1acneusushi/gradio-2dmoleculeeditor/data/ArcGIS 10.8 Full Crack Kuyhaa - A Powerful and Easy-to-Use GIS Software for Your PC.md deleted file mode 100644 index bf2afbc972824af6e9a169057b10f692d563899a..0000000000000000000000000000000000000000 --- a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/ArcGIS 10.8 Full Crack Kuyhaa - A Powerful and Easy-to-Use GIS Software for Your PC.md +++ /dev/null @@ -1,36 +0,0 @@ -
-

How to Download ArcGIS 10.8 Full Crack Kuyhaa and Use It for GIS Tasks

-

ArcGIS 10.8 is a popular and widely used geographic information system (GIS) software that allows you to work with maps and spatial data in various forms and formats. With ArcGIS 10.8, you can create, edit, and display spatial data, as well as perform spatial analysis, data management, visualization, and geoprocessing.

-

However, ArcGIS 10.8 is not a free software and requires a license to use it. If you want to use ArcGIS 10.8 for free, you can download the full crack version from Kuyhaa, a website that provides various software and games for free. In this article, we will show you how to download ArcGIS 10.8 full crack Kuyhaa and use it for your GIS tasks.

-

download arcgis 10.8 full crack kuyhaa


DOWNLOAD ››› https://byltly.com/2uKyxs



-

How to Download ArcGIS 10.8 Full Crack Kuyhaa

-

Downloading ArcGIS 10.8 full crack Kuyhaa is easy and fast. Just follow these steps:

-
    -
  1. Go to Kuyhaa's website and search for "ESRI ArcGIS Desktop v10.8.2 Gratis Download [2023]".
  2. -
  3. Click on the download link and wait for the download to finish.
  4. -
  5. Extract the downloaded file using WinRAR or 7-Zip.
  6. -
  7. Run the setup file and follow the instructions to install ArcGIS 10.8 on your computer.
  8. -
  9. Copy the crack file from the crack folder and paste it into the installation folder of ArcGIS 10.8.
  10. -
  11. Run ArcGIS 10.8 and enjoy using it for free.
  12. -
-

How to Use ArcGIS 10.8 for GIS Tasks

-

Using ArcGIS 10.8 for GIS tasks is fun and easy. Here are some basic steps to get you started:

-
    -
  1. Import your spatial data, such as shapefiles, geodatabases, CAD files, and more, to ArcGIS 10.8 by clicking on the "Add Data" button or dragging and dropping them to the map window.
  2. -
  3. Drag and drop your spatial data to the table of contents and arrange them in the order you want.
  4. -
  5. Add symbology, labels, legends, scale bars, north arrows, and other elements to your map by using the tools on the toolbar.
  6. -
  7. Edit your spatial data by using the tools on the editor toolbar, such as creating, modifying, deleting, snapping, splitting, merging, and more.
  8. -
  9. Analyze your spatial data by using the tools on the analysis toolbar or the geoprocessing toolbox, such as buffering, intersecting, clipping, overlaying, summarizing, and more.
  10. -
  11. Preview your map by clicking on the "Layout View" button on the bottom left corner of the map window. You can also adjust the page size, orientation, margins, and other settings by using the tools on the layout toolbar.
  12. -
  13. Export your map by clicking on the "File" menu and choosing "Export Map". You can choose your desired format, resolution, quality, and location for your map output.
  14. -
-

Tips and Tricks for Using ArcGIS 10.8

-

ArcGIS 10.8 has many advanced features that can help you enhance your GIS skills and productivity. Here are some tips and tricks for using ArcGIS 10.8:

-