paopaoka3325 commited on
Commit
4863bc1
·
1 Parent(s): 4b99f46

Add application files

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -51,7 +51,13 @@ def greet(name1, name2):
51
  # Output the extracted text
52
  output
53
  '''
54
-
 
 
 
 
 
 
55
 
56
  #### output_string1, error_string1=run_command("poetry")# ontogpt")
57
 
@@ -61,7 +67,7 @@ def greet(name1, name2):
61
  # return f"Inputs received: {str1} \n, {str2}, {str3}, {str4}, '--------------', '--------------', {output_string1},{error_string1},{output_string2},{error_string2},{output}"
62
  # # return location
63
  # For the purpose of this example, I'm just returning the values concatenated
64
- return f"{str4_input}"
65
 
66
  # Define 5 text input boxes with labels
67
  input_boxes = [
@@ -69,6 +75,7 @@ input_boxes = [
69
  gr.inputs.Textbox(lines=20,label="Input cencer report"),
70
  ]
71
 
72
- iface = gr.Interface(fn=greet, inputs=input_boxes, outputs="text")
 
73
  iface.launch()
74
 
 
51
  # Output the extracted text
52
  output
53
  '''
54
+ data = {
55
+ "Name": [name, name, name],
56
+ "Age": [30, 25, 35],
57
+ "City": ["New York", "San Francisco", "Los Angeles"]
58
+ }
59
+ df = pd.DataFrame(data)
60
+ return df.to_html()
61
 
62
  #### output_string1, error_string1=run_command("poetry")# ontogpt")
63
 
 
67
  # return f"Inputs received: {str1} \n, {str2}, {str3}, {str4}, '--------------', '--------------', {output_string1},{error_string1},{output_string2},{error_string2},{output}"
68
  # # return location
69
  # For the purpose of this example, I'm just returning the values concatenated
70
+ # return f"{str4_input}"
71
 
72
  # Define 5 text input boxes with labels
73
  input_boxes = [
 
75
  gr.inputs.Textbox(lines=20,label="Input cencer report"),
76
  ]
77
 
78
+ # iface = gr.Interface(fn=greet, inputs=input_boxes, outputs="text")
79
+ iface = gr.Interface(fn=greet, inputs=input_boxes, gr.outputs.HTML(label="Output Table"))
80
  iface.launch()
81