Bridger / test.py
KikiQiQi's picture
Upload 3 files
d2f74fc verified
raw
history blame contribute delete
604 Bytes
from gradio_client import Client
import json
messages = json.dumps([{"role":"user","content":"hi(from macbook)"}])
#
args = json.dumps({"api_key":"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",
"base_url":"https://api.openai.com/v1",
"model":"gpt-3.5-turbo",
"temperature":"1.0",
"max_tokens":"1024" })
client = Client("https://f2569cc8b84a4386fa.gradio.live/")
result = client.predict(
messages, # str in 'Input' Textbox component
args, # str in 'Args' Textbox component
api_name="/submit"
)
print(result)