sun script 1 me 3 new column add kr uska code aur logic de raha hu
...
๐ King Score
King Live Time (min)
King Live Since
King Live Till (min)
ab is code ko script 1 ki tableme new column add krna old sare column ko waise hi rahne dena aur buttons me koi changes mat krna aur unk logic aur formula sab wais hi rahne dena aur time bhi ab me script 1 de raha hu jisme tuje code k new column add krna hai aur full data fatch hona chahiye script 1
# app.py from flask import Flask, jsonify import numpy as np import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import LSTM, Dense import requests app = Flask(__name__) # Binance se last 60 minute price data fetch karna def fetch_binance_data(): url = "https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1m&limit=60" data = requests.get(url).json() closes = [float(item[4]) for item in data] return closes # LSTM input prepare karna sliding window ke form me def prepare_data(series, n_steps): X, y = [], [] for i in range(len(series) - n_steps): X.append(series[i:i+n_steps]) y.append(series[i+n_steps]) return np.array(X), np.array(y) # LSTM model train karna def train_model(series): n_steps = 10 X, y = prepare_data(series, n_steps) X = X.reshape((X.shape[0], X.shape[1], 1)) model = Sequential([ LSTM(50, activation='relu', input_shape=...
Comments
Post a Comment