Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,11 +26,8 @@ if 'chat_history_page1' not in st.session_state:
|
|
26 |
if 'chat_history_page2' not in st.session_state:
|
27 |
st.session_state['chat_history_page2'] = []
|
28 |
|
29 |
-
# Then use st.session_state['chat_history_page1'] within page1()
|
30 |
|
31 |
|
32 |
-
st.set_page_config(layout="wide")
|
33 |
-
|
34 |
# Step 1: Clone the Dataset Repository
|
35 |
repo = Repository(
|
36 |
local_dir="Private_Book", # Local directory to clone the repository
|
@@ -43,18 +40,8 @@ repo.git_pull() # Pull the latest changes (if any)
|
|
43 |
# Step 2: Load the PDF File
|
44 |
pdf_path = "Private_Book/KOMBI_all2.pdf" # Replace with your PDF file path
|
45 |
|
46 |
-
# Step 1: Clone the Dataset Repository
|
47 |
-
repo = Repository(
|
48 |
-
local_dir="Deutsche_Kodierrichtlinie23", # Local directory to clone the repository
|
49 |
-
repo_type="dataset", # Specify that this is a dataset repository
|
50 |
-
clone_from="Anne31415/Deutsche_Kodierrichtlinie23", # Replace with your repository URL
|
51 |
-
token=os.environ["HUB_TOKEN2"] # Use the secret token to authenticate
|
52 |
-
)
|
53 |
-
repo.git_pull() # Pull the latest changes (if any)
|
54 |
-
|
55 |
-
|
56 |
# Step 2: Load the PDF File
|
57 |
-
pdf_path2 = "
|
58 |
|
59 |
|
60 |
api_key = os.getenv("OPENAI_API_KEY")
|
|
|
26 |
if 'chat_history_page2' not in st.session_state:
|
27 |
st.session_state['chat_history_page2'] = []
|
28 |
|
|
|
29 |
|
30 |
|
|
|
|
|
31 |
# Step 1: Clone the Dataset Repository
|
32 |
repo = Repository(
|
33 |
local_dir="Private_Book", # Local directory to clone the repository
|
|
|
40 |
# Step 2: Load the PDF File
|
41 |
pdf_path = "Private_Book/KOMBI_all2.pdf" # Replace with your PDF file path
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
# Step 2: Load the PDF File
|
44 |
+
pdf_path2 = "Private_Book/Deutsche_Kodierrichtlinien_23.pdf" # Replace with your PDF file path
|
45 |
|
46 |
|
47 |
api_key = os.getenv("OPENAI_API_KEY")
|