Bofandra commited on
Commit
d065dd0
1 Parent(s): 74c9f1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -31,11 +31,9 @@ def respond(
31
  messages.append({"role": "assistant", "content": "I'd be happy to help! Please go ahead and provide the sentence you'd like me to analyze. Please specify whether you're referencing a particular verse or hadith (Prophetic tradition) from the Quran or Hadith, or if you're asking me to analyze a general statement."})
32
 
33
  #adding fatwa references
34
- #device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
35
- #selected_references = torch.load('selected_references.sav', map_location=torch.device(device))
36
- #encoded_questions = torch.load('encoded_questions.sav', map_location=torch.device(device))
37
- selected_references = pickle.load(open('selected_references.sav','rb'))
38
- encoded_questions = pickle.load(open('encoded_questions.sav','rb'))
39
 
40
  task = 'Given a web search query, retrieve relevant passages that answer the query'
41
  queries = [
 
31
  messages.append({"role": "assistant", "content": "I'd be happy to help! Please go ahead and provide the sentence you'd like me to analyze. Please specify whether you're referencing a particular verse or hadith (Prophetic tradition) from the Quran or Hadith, or if you're asking me to analyze a general statement."})
32
 
33
  #adding fatwa references
34
+ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
35
+ selected_references = torch.load('selected_references.sav', map_location=torch.device(device))
36
+ encoded_questions = torch.load('encoded_questions.sav', map_location=torch.device(device))
 
 
37
 
38
  task = 'Given a web search query, retrieve relevant passages that answer the query'
39
  queries = [