stupidcookgpt is powered by the miniGPT model, which is designed for lightweightedness and efficiency.
The API as such is very simple to use. You only need the gradio_client library.
The client in gradio_client is "ableian/scgpt", hosted on HuggingFace Spaces. The endpoint is /generate_recipe.
prompt (string, required): The input prompt describing the desired recipe.max_length (int, optional): The maximum length of the generated recipe. Default is 500 tokens.temperature (float, optional): Controls the randomness of the output. Default is 0.7.top_k (int, optional): The number of highest probability tokens to consider. Default is 50.top_p (float, optional): The cumulative probability threshold for nucleus sampling. Default is 0.9.from gradio_client import Client
client = Client("ableian/scgpt") # client for gradio app
response = client.predict(
"recipe for cereal coffee",
max_length=300,
temperature=0.85,
top_k=50,
top_p=0.9,
api_name="/generate_recipe"
)
print(response)