Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import pandas as pd
|
3 |
+
import numpy as np
|
4 |
+
import os
|
5 |
+
import time
|
6 |
+
import re
|
7 |
+
import json
|
8 |
+
from auditqa.sample_questions import QUESTIONS
|
9 |
+
from auditqa.engine.prompts import audience_prompts
|
10 |
+
from auditqa.reports import POSSIBLE_REPORTS, files
|
11 |
+
from auditqa.doc_process import process_pdf
|
12 |
+
from langchain_core.messages import (
|
13 |
+
HumanMessage,
|
14 |
+
SystemMessage,
|
15 |
+
)
|
16 |
+
from langchain_huggingface import ChatHuggingFace
|
17 |
+
from langchain_core.output_parsers import StrOutputParser
|
18 |
+
from langchain_huggingface import HuggingFaceEndpoint
|
19 |
+
from dotenv import load_dotenv
|
20 |
+
load_dotenv()
|
21 |
+
|
22 |
+
HF_token = os.environ["HF_TOKEN"]
|
23 |
+
process_pdf()
|