import gradio as gr from joblib import load from huggingface_hub import hf_hub_download import pandas as pd # Baixe o modelo do Hugging Face Hub model_path = hf_hub_download( repo_id="coan/botClaiton", filename="model.pkl", use_auth_token=True # Caso o repositório seja privado ) # Carregue o modelo model = joblib.load(model_path) # Carregar o modelo diretamente do Hugging Face model_path = hf_hub_download(repo_id="coan/botClaiton", filename="model.joblib") model = load(model_path) # Função de previsão def predict_price(open_price, high_price, low_price, volume): # Criar um dataframe com os dados de entrada data = pd.DataFrame({ "Open": [open_price], "High": [high_price], "Low": [low_price], "Volume": [volume], })