Spaces:
Running
Running
Commit
·
0fb7787
1
Parent(s):
5803605
Add application files
Browse files
app.py
CHANGED
@@ -71,8 +71,13 @@ def greet(name1, name2):
|
|
71 |
# Convert the key-value pairs into a table format (a list of lists)
|
72 |
df_pred = pd.DataFrame(key_value_pairs, columns = ["Ontology Attribute", "Value"]).iloc[:19,:]
|
73 |
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
# Save the CSV data to a temporary file
|
78 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".csv") as temp_file:
|
@@ -96,6 +101,7 @@ def greet(name1, name2):
|
|
96 |
input_boxes = [
|
97 |
gr.inputs.Textbox(label="openai api key"),
|
98 |
gr.inputs.Textbox(lines=20, label="Input cencer report", placeholder='Type text here...'),
|
|
|
99 |
]
|
100 |
|
101 |
disclaimer = (
|
|
|
71 |
# Convert the key-value pairs into a table format (a list of lists)
|
72 |
df_pred = pd.DataFrame(key_value_pairs, columns = ["Ontology Attribute", "Value"]).iloc[:19,:]
|
73 |
|
74 |
+
if show_full_table:
|
75 |
+
# Show the entire table
|
76 |
+
html_output = df_pred.to_html()
|
77 |
+
else:
|
78 |
+
# Show only the first 19 rows
|
79 |
+
html_output = df_pred.iloc[:15,:].to_html()
|
80 |
+
|
81 |
|
82 |
# Save the CSV data to a temporary file
|
83 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".csv") as temp_file:
|
|
|
101 |
input_boxes = [
|
102 |
gr.inputs.Textbox(label="openai api key"),
|
103 |
gr.inputs.Textbox(lines=20, label="Input cencer report", placeholder='Type text here...'),
|
104 |
+
gr.inputs.Checkbox(label="Show Full Table", default=False) # New checkbox input
|
105 |
]
|
106 |
|
107 |
disclaimer = (
|