test / app.py
sudhir2016's picture
Update app.py
5cce4db
raw
history blame
547 Bytes
import gradio as gr
import pandas as pd
import sketch
month=[['April 22', 207], ['May 22',209], ['June 22', 211], ['July 22', 190], ['August 22', 194], ['Sept 22', 199], ['Oct 22',187], ['Nov 22', 187], ['Dec 22', 205], ['Jan 23', 210], ['Feb 23', 210], ['March 23', 209]]
df=pd.DataFrame(month,columns= ['Month', 'Max Demand in GW'])
def answer(question):
out=df.sketch.ask(question,call_display=False)
return out
demo = gr.Interface(fn=answer, inputs='text',outputs='text',examples=[['which month has the highest max demand']])
demo.launch()