Spaces:
Runtime error
Runtime error
import gradio as gr | |
from gradio_client import Client | |
import os | |
HUGGINGFACEHUB_API_TOKEN=os.getenv("HUGGINGFACEHUB_API_TOKEN") | |
#client = Client("https://binqiangliu-llama2-with-gradio-chat.hf.space/", hf_token=HUGGINGFACEHUB_API_TOKEN, serialize=False) | |
client = Client("https://binqiangliu-llama2-with-gradio-chat.hf.space/") | |
result = client.predict( | |
"", # str (filepath to JSON file) in 'parameter_4' Json component | |
"Howdy!", # str in '' Textbox component | |
"Howdy!", # str in 'parameter_84' Textbox component | |
0, # int | float (numeric value between 0.0 and 2.0) in 'temp' Slider component | |
20, # int | float (numeric value between 20 and 1000) in 'top_k' Slider component | |
0, # int | float (numeric value between 0.0 and 2.0) in 'rep_penalty' Slider component | |
64, # int | float (numeric value between 64 and 8192) in 'new_tokens' Slider component | |
"true", # str in 'sample' Radio component | |
2, # int | float (numeric value between 2 and 10) in 'number of recent talks to keep' Slider component | |
"on", # str in 'internet mode' Radio component | |
"05e6a9eace677f93c0e4a93f750c12d03c1f81e043630cb93378da46ce616567", # str in 'Serper api key' Textbox component | |
fn_index=21 | |
) | |
print(result) |