Update app.py
Browse files
app.py
CHANGED
@@ -47,18 +47,11 @@ css = """
|
|
47 |
}
|
48 |
"""
|
49 |
|
50 |
-
# capybara_problem = '''Dr. Capy Cosmos, a capybara unlike any other, astounded the scientific community with his groundbreaking research in astrophysics. With his keen sense of observation and unparalleled ability to interpret cosmic data, he uncovered new insights into the mysteries of black holes and the origins of the universe. As he peered through telescopes with his large, round eyes, fellow researchers often remarked that it seemed as if the stars themselves whispered their secrets directly to him. Dr. Cosmos not only became a beacon of inspiration to aspiring scientists but also proved that intellect and innovation can be found in the most unexpected of creatures.'''
|
51 |
capybara_problem=''
|
52 |
with gr.Blocks(css=css,
|
53 |
theme=gr.themes.Soft(text_size="sm")) as app:
|
54 |
|
55 |
with gr.Row():
|
56 |
-
|
57 |
-
# with gr.Column(scale=3):
|
58 |
-
# gr.HTML("")
|
59 |
-
|
60 |
-
# with gr.Column(scale=3):
|
61 |
-
# gr.HTML("")
|
62 |
gr.HTML("""
|
63 |
<div style="text-align: center; margin: 0 auto;">
|
64 |
<p><h1> ChatCell: Facilitating Single-Cell Analysis with Natural Language</h1>
|
@@ -68,32 +61,6 @@ with gr.Blocks(css=css,
|
|
68 |
# gr.HTML("")
|
69 |
with gr.Row():
|
70 |
gr.Markdown("<p align='center'><a href='https://www.zjukg.org/project/ChatCell'>🐣Project</a> <a href='https://arxiv.org/abs/2306.08018'>📃Paper</a> <a href='https://github.com/zjunlp/ChatCell'>🥳Code</a></p>")
|
71 |
-
|
72 |
-
# gr.HTML("""
|
73 |
-
# <div style="text-align: center; margin: 0 auto;">
|
74 |
-
|
75 |
-
# <p><a href="https://arxiv.org/abs/2401.12070" target="_blank">paper</a>
|
76 |
-
# <a href="https://github.com/AHans30/Binoculars" target="_blank">code</a>
|
77 |
-
# <a href="mailto:[email protected]" target="_blank">contact</a>
|
78 |
-
# </div>
|
79 |
-
|
80 |
-
# """, elem_classes="hyperlinks")
|
81 |
-
|
82 |
-
# with gr.Column(scale=3):
|
83 |
-
# gr.HTML("")
|
84 |
-
|
85 |
-
# with gr.Column(scale=1):
|
86 |
-
# gr.HTML("""
|
87 |
-
# <p>
|
88 |
-
# <a href="https://arxiv.org/abs/2401.12070" target="_blank">paper</a>
|
89 |
-
|
90 |
-
# <a href="https://github.com/AHans30/Binoculars" target="_blank">code</a>
|
91 |
-
|
92 |
-
# <a href="mailto:[email protected]" target="_blank">contact</a>
|
93 |
-
# """, elem_classes="hyperlinks")
|
94 |
-
# with gr.Row():
|
95 |
-
|
96 |
-
# with gr.Column(scale=8):
|
97 |
with gr.Row():
|
98 |
input_box = gr.Textbox(value=capybara_problem, placeholder="Enter text here", lines=4, label="Input Text", )
|
99 |
with gr.Row():
|
@@ -114,34 +81,19 @@ with gr.Blocks(css=css,
|
|
114 |
],
|
115 |
examples_per_page=3,
|
116 |
inputs=[input_box],
|
117 |
-
# cache_examples=True,
|
118 |
-
# outputs=[output_text],
|
119 |
-
# fn=run_detector,
|
120 |
-
|
121 |
)
|
122 |
|
123 |
|
124 |
-
# with gr.Row():
|
125 |
-
# gr.HTML("<p><p><p>")
|
126 |
-
# with gr.Row():
|
127 |
-
# gr.HTML("<p><p><p>")
|
128 |
-
# with gr.Row():
|
129 |
-
# gr.HTML("<p><p><p>")
|
130 |
|
131 |
with gr.Accordion("Disclaimer", open=False):
|
132 |
gr.Markdown(
|
133 |
"""
|
134 |
- `Accuracy` :
|
135 |
-
-
|
136 |
-
|
137 |
-
-
|
138 |
-
- `
|
139 |
-
-
|
140 |
-
- We find optimal application in content moderation, for example in detecting AI-generated reviews on platforms like Amazon, Google, Yelp, etc. This represents one of the most compelling and noteworthy use cases for Binoculars.
|
141 |
-
- `Human Supervision Advisory` :
|
142 |
-
- Strongly caution against using Binoculars (or any detector) without human supervision.
|
143 |
-
- `Performance by Language` :
|
144 |
-
- As noted in our paper, Binoculars exhibit superior detection performance in the English language compared to other languages.
|
145 |
"""
|
146 |
)
|
147 |
with gr.Accordion("Cite our work", open=False):
|
@@ -157,10 +109,6 @@ with gr.Blocks(css=css,
|
|
157 |
|
158 |
"""
|
159 |
)
|
160 |
-
|
161 |
-
# confidence_bar = gr.Label(value={"Confidence": 0})
|
162 |
-
|
163 |
-
# clear_button.click(lambda x: input_box., )
|
164 |
submit_button.click(run_detector, inputs=input_box, outputs=output_text)
|
165 |
clear_button.click(lambda: ("", ""), outputs=[input_box, output_text])
|
166 |
|
|
|
47 |
}
|
48 |
"""
|
49 |
|
|
|
50 |
capybara_problem=''
|
51 |
with gr.Blocks(css=css,
|
52 |
theme=gr.themes.Soft(text_size="sm")) as app:
|
53 |
|
54 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
gr.HTML("""
|
56 |
<div style="text-align: center; margin: 0 auto;">
|
57 |
<p><h1> ChatCell: Facilitating Single-Cell Analysis with Natural Language</h1>
|
|
|
61 |
# gr.HTML("")
|
62 |
with gr.Row():
|
63 |
gr.Markdown("<p align='center'><a href='https://www.zjukg.org/project/ChatCell'>🐣Project</a> <a href='https://arxiv.org/abs/2306.08018'>📃Paper</a> <a href='https://github.com/zjunlp/ChatCell'>🥳Code</a></p>")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
with gr.Row():
|
65 |
input_box = gr.Textbox(value=capybara_problem, placeholder="Enter text here", lines=4, label="Input Text", )
|
66 |
with gr.Row():
|
|
|
81 |
],
|
82 |
examples_per_page=3,
|
83 |
inputs=[input_box],
|
|
|
|
|
|
|
|
|
84 |
)
|
85 |
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
with gr.Accordion("Disclaimer", open=False):
|
89 |
gr.Markdown(
|
90 |
"""
|
91 |
- `Accuracy` :
|
92 |
+
- This model aims for accuracy but cannot guarantee 100% precision. Results should be used as a guide, not as definitive tools.
|
93 |
+
- `Use Restrictions`:
|
94 |
+
- Intended for educational and research purposes only. Not for clinical or commercial use without prior verification.
|
95 |
+
- `Responsibility`:
|
96 |
+
- Users are solely responsible for any outcomes resulting from the use of this model.
|
|
|
|
|
|
|
|
|
|
|
97 |
"""
|
98 |
)
|
99 |
with gr.Accordion("Cite our work", open=False):
|
|
|
109 |
|
110 |
"""
|
111 |
)
|
|
|
|
|
|
|
|
|
112 |
submit_button.click(run_detector, inputs=input_box, outputs=output_text)
|
113 |
clear_button.click(lambda: ("", ""), outputs=[input_box, output_text])
|
114 |
|