ppsingh commited on
Commit
96058bb
1 Parent(s): 5f923c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -12
app.py CHANGED
@@ -30,7 +30,7 @@ async def chat(query,history,audience,sources,reports):
30
  print(f"reports:{reports}")
31
  docs_html = ""
32
  output_query = ""
33
- output_language = "english"
34
 
35
  if audience == "Children":
36
  audience_prompt = audience_prompts["children"]
@@ -153,11 +153,13 @@ theme = gr.themes.Base(
153
  init_prompt = """
154
  Hello, I am Audit Q&A, a conversational assistant designed to help you understand audit Reports. I will answer your questions by **crawling through the Audit reports publishsed by Auditor General Office**.
155
  ❓ How to use
156
- - **Language**: You can ask me your questions in any language.
157
- - **Audience**: You can specify your audience (children, general public, experts) to get a more adapted answer.
158
- - **Sources**: You can choose to search in the Annual or District or Department focused reports, or all.
 
159
  ⚠️ Limitations
160
- *Please note that the AI 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.*
 
161
  What do you want to learn ?
162
  """
163
 
@@ -242,15 +244,17 @@ with gr.Blocks(title="Audit Q&A", css="style.css", theme=theme,elem_id = "main-c
242
  interactive=True,
243
  )
244
 
245
- dropdown_audience = gr.Dropdown(
246
- ["Children","General public","Experts"],
247
- label="Select audience",
248
- value="Experts",
249
- interactive=True,
250
- )
 
251
 
252
  output_query = gr.Textbox(label="Query used for retrieval",show_label = True,elem_id = "reformulated-query",lines = 2,interactive = False)
253
- output_language = gr.Textbox(label="Language",show_label = True,elem_id = "language",lines = 1,interactive = False)
 
254
 
255
  with gr.Tab("About",elem_classes = "max-height other-tabs"):
256
  with gr.Row():
 
30
  print(f"reports:{reports}")
31
  docs_html = ""
32
  output_query = ""
33
+ output_language = "English"
34
 
35
  if audience == "Children":
36
  audience_prompt = audience_prompts["children"]
 
153
  init_prompt = """
154
  Hello, I am Audit Q&A, a conversational assistant designed to help you understand audit Reports. I will answer your questions by **crawling through the Audit reports publishsed by Auditor General Office**.
155
  ❓ How to use
156
+ - **Examples**(tab on right): If this is first time for you using this app, then we have curated some example questions.Select a particular question from category fo questions.
157
+ - **Reports(tab on right): You can choose to search or address your question to either specific report or a collection of reportlike Consolidated Annual Report,District or Department focused reports. If you dont select \
158
+ then the Consolidated report is relied upon to answer your question.
159
+ - **Sources**(tab on right): This tab will display the relied upon paragraphs from the report, to help you in assessing or fact checking if the answer provided by Audit Q&A assitant is correct or not.
160
  ⚠️ Limitations
161
+ - *Please note that the AI 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.*
162
+ - Audit Q&A assistant is a Generative AI, and therefore is not deterministic, so there might be change in answer to same question.
163
  What do you want to learn ?
164
  """
165
 
 
244
  interactive=True,
245
  )
246
 
247
+ dropdown_audience = "Experts"
248
+ #dropdown_audience = gr.Dropdown(
249
+ # ["Children","General public","Experts"],
250
+ # label="Select audience",
251
+ # value="Experts",
252
+ # interactive=True,
253
+ #)
254
 
255
  output_query = gr.Textbox(label="Query used for retrieval",show_label = True,elem_id = "reformulated-query",lines = 2,interactive = False)
256
+ output_language = "English"
257
+ # gr.Textbox(label="Language",show_label = True,elem_id = "language",lines = 1,interactive = False)
258
 
259
  with gr.Tab("About",elem_classes = "max-height other-tabs"):
260
  with gr.Row():