Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
3 |
import torch
|
@@ -32,7 +78,6 @@ def generate_response(input_text, query, tokenizer, model):
|
|
32 |
Based on the following context/document:
|
33 |
{}
|
34 |
Please answer the question: {}
|
35 |
-
|
36 |
### Response:
|
37 |
{}
|
38 |
"""
|
@@ -69,3 +114,4 @@ def main():
|
|
69 |
|
70 |
if __name__ == "__main__":
|
71 |
main()
|
|
|
|
1 |
+
Hugging Face's logo
|
2 |
+
Hugging Face
|
3 |
+
Search models, datasets, users...
|
4 |
+
Models
|
5 |
+
Datasets
|
6 |
+
Spaces
|
7 |
+
Posts
|
8 |
+
Docs
|
9 |
+
Pricing
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
Spaces:
|
14 |
+
|
15 |
+
Waseem7711
|
16 |
+
/
|
17 |
+
RAG_Chat_Bot
|
18 |
+
|
19 |
+
|
20 |
+
like
|
21 |
+
0
|
22 |
+
|
23 |
+
App
|
24 |
+
Files
|
25 |
+
Community
|
26 |
+
Settings
|
27 |
+
RAG_Chat_Bot
|
28 |
+
/
|
29 |
+
app.py
|
30 |
+
|
31 |
+
Waseem7711's picture
|
32 |
+
Waseem7711
|
33 |
+
Update app.py
|
34 |
+
43c74e3
|
35 |
+
verified
|
36 |
+
12 minutes ago
|
37 |
+
raw
|
38 |
+
|
39 |
+
Copy download link
|
40 |
+
history
|
41 |
+
blame
|
42 |
+
edit
|
43 |
+
delete
|
44 |
+
No virus
|
45 |
+
|
46 |
+
2.21 kB
|
47 |
import streamlit as st
|
48 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
49 |
import torch
|
|
|
78 |
Based on the following context/document:
|
79 |
{}
|
80 |
Please answer the question: {}
|
|
|
81 |
### Response:
|
82 |
{}
|
83 |
"""
|
|
|
114 |
|
115 |
if __name__ == "__main__":
|
116 |
main()
|
117 |
+
|