LastHourforcast / main.py
YaakovY's picture
1
63bc08c
raw history blame
No virus
706 Bytes
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