Spaces:
Sleeping
Sleeping
File size: 706 Bytes
36844c0 61c35dc 36844c0 81c8033 0f9f1bf 36844c0 61c35dc 63bc08c 61c35dc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
from fastapi import FastAPI
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import yfinance as yf
import datetime as dt
import xgboost as xgb
from sklearn.metrics import mean_squared_error
color_pal = sns.color_palette()
plt.style.use("fivethirtyeight")
app = FastAPI()
@app.get("/")
def read_root():
return {
"message": "Hello, Please type a ticker at the end of the URL to get LAST TRADING HOUR FORCAST.",
"format": "https://yaakovy-lasthourforcast.hf.space/ticker/[TICKER]",
"example": "https://yaakovy-lasthourforcast.hf.space/ticker/msft",
}
@app.get("/ticker/{ticker}")
def read_item(ticker: str):
return ticker
|