Spaces:
Running
Running
File size: 602 Bytes
86faca9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# tool_registry.py
from gradio_client import Client
import gradio as gr
def chatgpt_tool(text_input):
client = Client("yuntian-deng/ChatGPT")
result = client.predict(
inputs=text_input,
top_p=1,
temperature=1,
chat_counter=0,
chatbot=[],
api_name="/predict"
)
return result
TOOL_REGISTRY = [
{
"name": "ChatGPT Remote",
"func": chatgpt_tool,
"inputs": gr.Textbox(label="Input"),
"outputs": gr.Textbox(label="Response"),
"api_name": "chatgpt_remote",
},
# Add more remote tools here
]
|