File size: 494 Bytes
857e23d
 
 
 
 
 
 
 
 
622387f
 
ccaa6ce
857e23d
622387f
857e23d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr
import pandas as pd

def greet(name):
  boxes = {'Color': ['Green','Green','Green','Blue','Blue','Red','Red','Red'],
           'Shape': ['Rectangle','Rectangle','Square','Rectangle','Square','Square','Square','Rectangle'],
           'Price': [10,15,5,5,10,15,15,5]
          }
  df = pd.DataFrame(boxes, columns= ['Color','Shape','Price'])
  df.to_excel("output.xlsx")
  
  return "output.xlsx"

iface = gr.Interface(fn=greet, inputs="text", outputs="file")
iface.launch()