Spaces:
Sleeping
Sleeping
Added adrega documentation as context
Browse files
app.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
qa_pipeline = pipeline("question-answering")
|
|
|
|
| 5 |
st.title("Adrega AI Help")
|
| 6 |
-
context = ""
|
|
|
|
| 7 |
Adrega PI Help AI is Adregas fourth attempt to generate AI based help
|
| 8 |
content for the users. First we tried Gemini, but it was not very cost
|
| 9 |
effective and we werent able to use if for reading help docuemntation
|
|
@@ -11,6 +13,9 @@ and answer based on it. Then we tried GPT-4all, but it was very slow and since
|
|
| 11 |
running locally it ate up a lot of precious resources. Finally we tried
|
| 12 |
Hugging Face, and this far, it seems to be working.
|
| 13 |
"""
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
user_input = st.text_input('Ask me a question')
|
| 16 |
if st.button("Submit"):
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
#qa_pipeline = pipeline("question-answering")
|
| 5 |
+
qa_pipeline = pipeline("question-answering", model="microsoft/Phi-3-mini-4k-instruct")
|
| 6 |
st.title("Adrega AI Help")
|
| 7 |
+
context = dataset[0]["text"]
|
| 8 |
+
"""context = """
|
| 9 |
Adrega PI Help AI is Adregas fourth attempt to generate AI based help
|
| 10 |
content for the users. First we tried Gemini, but it was not very cost
|
| 11 |
effective and we werent able to use if for reading help docuemntation
|
|
|
|
| 13 |
running locally it ate up a lot of precious resources. Finally we tried
|
| 14 |
Hugging Face, and this far, it seems to be working.
|
| 15 |
"""
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
dataset = load_dataset("andreska/adregadocs", split="train")
|
| 19 |
|
| 20 |
user_input = st.text_input('Ask me a question')
|
| 21 |
if st.button("Submit"):
|