Spaces:
Runtime error
Runtime error
Download app.py from GhostSanjo/AuditGeneration: direct link, hf CLI and curl.
- Browser
- Download file 2.89 kB
-
https://huggingface.co/spaces/GhostSanjo/AuditGeneration/resolve/main/app.py
- Command line
-
hf download hf://spaces/GhostSanjo/AuditGeneration/app.py
-
curl -L -o app.py https://huggingface.co/spaces/GhostSanjo/AuditGeneration/resolve/main/app.py
2.89 kB
| data_new = [ | |
| { | |
| "question": "1. **Is the date of the audit older than 12 months?** -", | |
| "answer": "No." | |
| }, | |
| { | |
| "question": "2. **Was the auditor selected by the auditee?** -", | |
| "answer": "Data not provided" | |
| }, | |
| { | |
| "question": "3. **Does the auditor provide services to the auditee other than the audit itself?** -", | |
| "answer": "Data not provided" | |
| }, | |
| { | |
| "question": "4. **Does the audit report contain an individual auditor assurance statement?** -", | |
| "answer": "No auditor assurance statement found" | |
| }, | |
| { | |
| "question": "5. **Does the assurance statement specifically address the risk of material misstatements?** -", | |
| "answer": "No auditor assurance statement found" | |
| }, | |
| { | |
| "question": "6. **Was the audit scheduled announced?** -", | |
| "answer": "Yes." | |
| }, | |
| { | |
| "question": "7. **Where workers interviewed Onsite, Offsite or Both?** -", | |
| "answer": "Yes." | |
| }, | |
| { | |
| "question": "8. **Were multiple methods used for worker sentiment analysis?** -", | |
| "answer": "No." | |
| }, | |
| { | |
| "question": "9. **Are the workforce information of the auditee disclosed?** -", | |
| "answer": "Yes." | |
| }, | |
| { | |
| "question": "10. **Are the operating shift times of the auditee disclosed?** -", | |
| "answer": "No - data not provided." | |
| }, | |
| { | |
| "question": "11. **Is the audit team composition, including gender diversity and language skills, disclosed?** -", | |
| "answer": "No." | |
| }, | |
| { | |
| "question": "12. **Is the start and end time of the audit, including time spent in each work shift disclosed in the report?** -", | |
| "answer": "Partially Yes." | |
| }, | |
| { | |
| "question": "13. **Are the worker engagement models described in detail?** -", | |
| "answer": "Yes." | |
| }, | |
| { | |
| "question": "14. **Are the specific risks associated with the industry or country level disclosed?** -", | |
| "answer": "No." | |
| }, | |
| { | |
| "question": "15. **Has an affidavit or attestation of independence (no conflicts check) been \n completed for the subject audit by an authorized representative of the auditor?** -", | |
| "answer": "No." | |
| } | |
| ] | |
| def questionFormat(input): | |
| report_response = "" | |
| for info in data_new: | |
| report_response = report_response+"\n"+info["question"]+"\n\n"+info["answer"]+"\n\n" | |
| return str(report_response) | |
| report_response = questionFormat("") | |
| def predict1(input, history): | |
| if input=="": | |
| return str(report_response) | |
| else: | |
| return str(input) | |
| import gradio as gr | |
| gr.ChatInterface(predict1,title="Audit Report Analysis", | |
| chatbot=gr.Chatbot(visible=False), | |
| textbox=gr.Textbox(visible=False), | |
| description=report_response,submit_btn=None, | |
| retry_btn=None,undo_btn=None,clear_btn=None, | |
| autofocus=False).launch(share=True) |