npc0 commited on
Commit
9498171
·
verified ·
1 Parent(s): 79d0b80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -6
app.py CHANGED
@@ -21,15 +21,37 @@ docs = Docs(llm="langchain",
21
  client=llm)
22
  docs.max_concurrent = 1
23
  docs.add('knowledge_extraction.csv', disable_check=True)
 
24
 
25
- def respond(message):
26
  return docs.query(messages).answer
27
 
28
- """
29
- For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
30
- """
31
- demo = gr.ChatInterface(respond)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
 
34
  if __name__ == "__main__":
35
- demo.launch()
 
21
  client=llm)
22
  docs.max_concurrent = 1
23
  docs.add('knowledge_extraction.csv', disable_check=True)
24
+ docs.add('SSA - POMS_ SI 00502.100 - Basic SSI Alien Eligibility Requirements - 11_30_2023.pdf', disable_check=True)
25
 
26
+ def respond(message, *args, **kwargs):
27
  return docs.query(messages).answer
28
 
29
+
30
+ examples = [["A qualified alien entered the United States on August 15, 1996. Tell me about their eligibility for Supplemental Security Income (SSI)."],
31
+ ["""Question: Which of the following statements most accurately reflects the eligibility requirements for Supplemental Security Income (SSI) as outlined in the Alien Eligibility Under Welfare Reform?
32
+
33
+ A) To be eligible for SSI, an individual must be a U.S. citizen, with no exceptions for non-citizens.
34
+
35
+ B) SSI eligibility is extended to all individuals residing in the United States, regardless of their citizenship or immigration status.
36
+
37
+ C) To be eligible for SSI, an individual must be either a U.S. citizen or a qualified alien.
38
+
39
+ D) SSI eligibility is determined solely based on financial need, without consideration of citizenship or immigration status."""]
40
+ ["""Explanate the Correct Answer: C
41
+ Question: Which of the following statements most accurately reflects the eligibility requirements for Supplemental Security Income (SSI) as outlined in the Alien Eligibility Under Welfare Reform?
42
+
43
+ A) To be eligible for SSI, an individual must be a U.S. citizen, with no exceptions for non-citizens.
44
+
45
+ B) SSI eligibility is extended to all individuals residing in the United States, regardless of their citizenship or immigration status.
46
+
47
+ C) To be eligible for SSI, an individual must be either a U.S. citizen or a qualified alien.
48
+
49
+ D) SSI eligibility is determined solely based on financial need, without consideration of citizenship or immigration status."""]]
50
+
51
+ demo = gr.ChatInterface(
52
+ respond,
53
+ examples=examples)
54
 
55
 
56
  if __name__ == "__main__":
57
+ demo.launch(auth=("tester", "8888p4ss"))