bobpeulen commited on
Commit
ed7fe7c
·
1 Parent(s): c9b35f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -6,7 +6,12 @@ import numpy as np
6
  def full_function(xml_file):
7
 
8
  output_text = "yes"
9
- return output_text
 
 
 
 
 
10
 
11
 
12
 
@@ -20,9 +25,10 @@ with gr.Blocks() as demo:
20
  # input_question = gr.Text(label="What activity is the Oracle Partner performing?")
21
  # additional_info = gr.Text(label="Additional information (optional)")
22
  output_text = gr.Text(label="R")
 
23
 
24
 
25
  submit_btn = gr.Button("Run analysis on XML file")
26
 
27
 
28
- gr.Interface(fn=full_function, inputs=xml_file, outputs=output_text, title=desc).launch(share=True)
 
6
  def full_function(xml_file):
7
 
8
  output_text = "yes"
9
+
10
+ d = {'col1': [0, 1, 2, 3], 'col2': pd.Series([2, 3], index=[2, 3])}
11
+ df = pd.DataFrame(data=d, index=[0, 1, 2, 3])
12
+
13
+
14
+ return output_text, df
15
 
16
 
17
 
 
25
  # input_question = gr.Text(label="What activity is the Oracle Partner performing?")
26
  # additional_info = gr.Text(label="Additional information (optional)")
27
  output_text = gr.Text(label="R")
28
+ df = gr.DataFrame(label="Output table")
29
 
30
 
31
  submit_btn = gr.Button("Run analysis on XML file")
32
 
33
 
34
+ gr.Interface(fn=full_function, inputs=xml_file, outputs=[output_text, df], title=desc).launch(share=True)