Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def respond(message,
|
|
28 |
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."})
|
29 |
|
30 |
#adding fatwa references
|
31 |
-
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
32 |
selected_references = torch.load('selected_references.sav', map_location=torch.device(device))
|
33 |
encoded_questions = torch.load('encoded_questions.sav', map_location=torch.device(device))
|
34 |
|
@@ -71,7 +71,7 @@ def respond(message,
|
|
71 |
print("adding fatwa references exception occurred")
|
72 |
|
73 |
print("append references\n")
|
74 |
-
print(time.time())
|
75 |
|
76 |
#adding more references
|
77 |
df = pd.read_csv("moslem-bot-reference.csv", sep='|')
|
|
|
28 |
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."})
|
29 |
|
30 |
#adding fatwa references
|
31 |
+
'''device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
32 |
selected_references = torch.load('selected_references.sav', map_location=torch.device(device))
|
33 |
encoded_questions = torch.load('encoded_questions.sav', map_location=torch.device(device))
|
34 |
|
|
|
71 |
print("adding fatwa references exception occurred")
|
72 |
|
73 |
print("append references\n")
|
74 |
+
print(time.time())'''
|
75 |
|
76 |
#adding more references
|
77 |
df = pd.read_csv("moslem-bot-reference.csv", sep='|')
|