Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from description import *
|
|
3 |
|
4 |
from reference_string_parsing import *
|
5 |
from controlled_summarization import *
|
6 |
-
|
7 |
|
8 |
with gr.Blocks(css="#htext span {white-space: pre-line}") as demo:
|
9 |
gr.Markdown("# Gradio Demo for SciAssist")
|
@@ -96,51 +96,51 @@ with gr.Blocks(css="#htext span {white-space: pre-line}") as demo:
|
|
96 |
)
|
97 |
|
98 |
|
99 |
-
#
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
|
145 |
|
146 |
demo.launch(share=False)
|
|
|
3 |
|
4 |
from reference_string_parsing import *
|
5 |
from controlled_summarization import *
|
6 |
+
from dataset_extraction import *
|
7 |
|
8 |
with gr.Blocks(css="#htext span {white-space: pre-line}") as demo:
|
9 |
gr.Markdown("# Gradio Demo for SciAssist")
|
|
|
96 |
)
|
97 |
|
98 |
|
99 |
+
# Dataset Extraction
|
100 |
+
with gr.TabItem("Dataset Mentions Extraction"):
|
101 |
+
with gr.Box():
|
102 |
+
gr.Markdown(de_str_md)
|
103 |
+
with gr.Row():
|
104 |
+
with gr.Column():
|
105 |
+
de_str = gr.Textbox(label="Input String")
|
106 |
+
with gr.Row():
|
107 |
+
de_str_btn = gr.Button("Extract")
|
108 |
+
de_str_output = gr.HighlightedText(
|
109 |
+
elem_id="htext",
|
110 |
+
label="The Result of Extraction",
|
111 |
+
combine_adjacent=True,
|
112 |
+
adjacent_separator=" ",
|
113 |
+
)
|
114 |
+
de_str_examples = gr.Examples(examples=[["The impact of gender identity on emotions was examined by researchers using a subsample from the National Longitudinal Study of Adolescent Health. The study aimed to investigate the direct effects of gender identity on emotional experiences and expression. By focusing on a subsample of the larger study, the researchers were able to hone in on the specific relationship between gender identity and emotions. Through their analysis, the researchers sought to determine whether gender identity could have a significant and direct impact on emotional well-being. The findings of the study have important implications for our understanding of the complex interplay between gender identity and emotional experiences, and may help to inform future interventions and support for individuals who experience gender-related emotional distress."],
|
115 |
+
["The possibility of genotype-environment interaction for memory performance and change was examined in 150 monozygotic twin pairs from the Swedish Adoption Twin Study of Aging and the National Comorbidity Survey. They aimed to explore how genetic and environmental factors could interact to affect cognitive performance in aging individuals. Through their analysis, the researchers hoped to gain a better understanding of the complex interplay between nature and nurture in determining cognitive outcomes. By investigating the unique characteristics of monozygotic twins, who share identical genetic material, the study was able to isolate the role of environmental factors in shaping cognitive abilities over time. The findings from this research have important implications for our understanding of the complex interplay between genetics and the environment in shaping cognitive outcomes in aging individuals."]],
|
116 |
+
inputs=[de_str])
|
117 |
+
with gr.Box():
|
118 |
+
gr.Markdown(de_file_md)
|
119 |
+
with gr.Row():
|
120 |
+
with gr.Column():
|
121 |
+
de_file = gr.File(label="Input File")
|
122 |
+
with gr.Row():
|
123 |
+
de_file_btn = gr.Button("Extract")
|
124 |
+
|
125 |
+
de_file_output = gr.HighlightedText(
|
126 |
+
elem_id="htext",
|
127 |
+
label="The Result of Extraction",
|
128 |
+
combine_adjacent=True,
|
129 |
+
adjacent_separator=" ",
|
130 |
+
)
|
131 |
+
de_file_examples = gr.Examples(examples=[["examples/127.txt"]], inputs=[de_file])
|
132 |
+
|
133 |
+
|
134 |
+
de_file_btn.click(
|
135 |
+
fn=de_for_file,
|
136 |
+
inputs=[de_file],
|
137 |
+
outputs=de_file_output
|
138 |
+
)
|
139 |
+
de_str_btn.click(
|
140 |
+
fn=de_for_str,
|
141 |
+
inputs=[de_str],
|
142 |
+
outputs=de_str_output
|
143 |
+
)
|
144 |
|
145 |
|
146 |
demo.launch(share=False)
|