amina-k commited on
Commit
edd1bb8
·
verified ·
1 Parent(s): 1ac82ee

clean up the knowledge file path

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -1,15 +1,13 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient #imports huggingface models
3
  import os
4
-
5
  from sentence_transformers import SentenceTransformer
6
  import torch
7
  import numpy as np
8
 
9
-
10
-
11
  #load and process the knowledge base text file
12
- with open("/content/knowledge.txt", "r", encoding="utf-8") as f:
13
  knowledge_text = f.read()
14
 
15
  #split the text into chunks
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient #imports huggingface models
3
  import os
4
+ import difflib # for fuzzy matching
5
  from sentence_transformers import SentenceTransformer
6
  import torch
7
  import numpy as np
8
 
 
 
9
  #load and process the knowledge base text file
10
+ with open("knowledge.txt", "r", encoding="utf-8") as f:
11
  knowledge_text = f.read()
12
 
13
  #split the text into chunks