File size: 545 Bytes
c2493db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
from joblib import load
from huggingface_hub import hf_hub_download
import pandas as pd

# Carregar o modelo diretamente do Hugging Face
model_path = hf_hub_download(repo_id="coan/botClaiton", filename="model.pkl")
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],
    })