onstop321 commited on
Commit
dcb4118
·
verified ·
1 Parent(s): 49350f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -1,14 +1,14 @@
1
  import gradio as gr
2
 
3
- # --- Load your manual file ---
4
- with open("sierra_manual.txt", "r", encoding="utf-8") as f:
5
- manual_text = f.read().lower()
6
-
7
- messages = []
8
-
9
- def chatbot(user_input):
10
- global messages
11
- messages.append(("user", user_input))
12
 
13
  # Search the manual for any words the user typed
14
  found = []
 
1
  import gradio as gr
2
 
3
+ # --- Load multiple manuals ---
4
+ manuals = {}
5
+
6
+ for filename in ["sierra.txt", "sierra engine.txt"]:
7
+ try:
8
+ with open(filename, "r", encoding="utf-8") as f:
9
+ manuals[filename] = f.read().lower()
10
+ except FileNotFoundError:
11
+ manuals[filename] = ""
12
 
13
  # Search the manual for any words the user typed
14
  found = []