Spaces:
Sleeping
Sleeping
update frontend with login button
Browse files
app.py
CHANGED
@@ -201,7 +201,8 @@ theme = gr.themes.Base(
|
|
201 |
|
202 |
|
203 |
init_prompt = """
|
204 |
-
Hello, I am ESRS Q&A, a conversational assistant designed to help you understand the content of European Sustainability Reporting Standards (ESRS). I will answer your questions based **on the official definition of each ESRS as well as guidelines**.
|
|
|
205 |
⚠️ Limitations
|
206 |
*Please note that this chatbot is in an early stage phase, it is not perfect and may sometimes give irrelevant answers. If you are not satisfied with the answer, please ask a more specific question or report your feedback to help us improve the system.*
|
207 |
|
@@ -210,16 +211,16 @@ What do you want to learn ?
|
|
210 |
|
211 |
|
212 |
with gr.Blocks(title=f"{demo_name}", css=css, theme=theme) as demo:
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
|
222 |
-
with gr.Column(visible=
|
223 |
with gr.Tab("ESRS Q&A"):
|
224 |
with gr.Row():
|
225 |
with gr.Column(scale=2):
|
@@ -255,19 +256,18 @@ with gr.Blocks(title=f"{demo_name}", css=css, theme=theme) as demo:
|
|
255 |
with gr.Column(scale=1):
|
256 |
gr.Markdown("WIP")
|
257 |
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
|
268 |
|
269 |
demo.launch(
|
270 |
share=True,
|
271 |
-
# auth=("", ""),
|
272 |
debug=True,
|
273 |
)
|
|
|
201 |
|
202 |
|
203 |
init_prompt = """
|
204 |
+
Hello, I am ESRS Q&A, a conversational assistant designed to help you understand the content of European Sustainability Reporting Standards (ESRS). I will answer your questions based **on the official definition of each ESRS as well as complementary guidelines**.
|
205 |
+
|
206 |
⚠️ Limitations
|
207 |
*Please note that this chatbot is in an early stage phase, it is not perfect and may sometimes give irrelevant answers. If you are not satisfied with the answer, please ask a more specific question or report your feedback to help us improve the system.*
|
208 |
|
|
|
211 |
|
212 |
|
213 |
with gr.Blocks(title=f"{demo_name}", css=css, theme=theme) as demo:
|
214 |
+
gr.LoginButton()
|
215 |
+
with gr.Column() as bloc_1:
|
216 |
+
textbox_1 = gr.Textbox("You are not logged to Hugging Face !", show_label=False)
|
217 |
|
218 |
+
with gr.Column(visible=False) as bloc_3:
|
219 |
+
textbox_3 = gr.Textbox(
|
220 |
+
"You are not part of the ESRS Q&A Project, if interested ask access here : https://huggingface.co/ekimetrics-esrsqa"
|
221 |
+
)
|
222 |
|
223 |
+
with gr.Column(visible=False) as bloc_2:
|
224 |
with gr.Tab("ESRS Q&A"):
|
225 |
with gr.Row():
|
226 |
with gr.Column(scale=2):
|
|
|
256 |
with gr.Column(scale=1):
|
257 |
gr.Markdown("WIP")
|
258 |
|
259 |
+
demo.load(update_visible, inputs=None, outputs=[bloc_1, bloc_2, bloc_3])
|
260 |
+
ask.submit(
|
261 |
+
fn=chat,
|
262 |
+
inputs=[
|
263 |
+
ask,
|
264 |
+
state,
|
265 |
+
],
|
266 |
+
outputs=[ask, chatbot, state, sources_textbox],
|
267 |
+
)
|
268 |
|
269 |
|
270 |
demo.launch(
|
271 |
share=True,
|
|
|
272 |
debug=True,
|
273 |
)
|