JirasakJo commited on
Commit
8dc9051
·
verified ·
1 Parent(s): eeb973e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -131,8 +131,6 @@ def save_qa_history(history_entry):
131
  with open(history_file, "r", encoding="utf-8") as f:
132
  file_content = f.read()
133
 
134
- # Debug: Log file content
135
- st.info(f"File content (first 500 chars): {file_content[:500]}")
136
 
137
  if not file_content.strip():
138
  st.warning("JSON file is empty, initializing new history")
@@ -202,10 +200,7 @@ def save_qa_history(history_entry):
202
  try:
203
  from github import Github
204
  g = Github(github_token)
205
-
206
- # Add debug logging
207
- st.info("Attempting to connect to GitHub repository...")
208
-
209
  repo = g.get_repo("jirasaksaimekJijo/swu-chat-bot-project")
210
 
211
  try:
@@ -223,7 +218,6 @@ def save_qa_history(history_entry):
223
  sha=contents.sha,
224
  branch="main" # Explicitly specify branch
225
  )
226
- st.success("Successfully updated qa_history.json on GitHub")
227
 
228
  except Exception as file_error:
229
  st.info("File not found, creating new qa_history.json...")
 
131
  with open(history_file, "r", encoding="utf-8") as f:
132
  file_content = f.read()
133
 
 
 
134
 
135
  if not file_content.strip():
136
  st.warning("JSON file is empty, initializing new history")
 
200
  try:
201
  from github import Github
202
  g = Github(github_token)
203
+
 
 
 
204
  repo = g.get_repo("jirasaksaimekJijo/swu-chat-bot-project")
205
 
206
  try:
 
218
  sha=contents.sha,
219
  branch="main" # Explicitly specify branch
220
  )
 
221
 
222
  except Exception as file_error:
223
  st.info("File not found, creating new qa_history.json...")