sudhir2016 commited on
Commit
5cce4db
1 Parent(s): e114000

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -1 +1,10 @@
1
- x=2+3
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+ import sketch
4
+ 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]]
5
+ df=pd.DataFrame(month,columns= ['Month', 'Max Demand in GW'])
6
+ def answer(question):
7
+ out=df.sketch.ask(question,call_display=False)
8
+ return out
9
+ demo = gr.Interface(fn=answer, inputs='text',outputs='text',examples=[['which month has the highest max demand']])
10
+ demo.launch()