Spaces:
Sleeping
Sleeping
Reinserted dataset context
Browse files
app.py
CHANGED
|
@@ -1,13 +1,14 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
-
|
| 4 |
|
| 5 |
pipe = pipeline("question-answering")
|
| 6 |
#pipe = pipeline("text-generation")
|
| 7 |
|
| 8 |
st.title("Adrega AI Help")
|
| 9 |
-
|
| 10 |
-
context =
|
|
|
|
| 11 |
|
| 12 |
user_input = st.text_input('Ask me a question')
|
| 13 |
if st.button("Submit"):
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
+
from datasets import load_dataset
|
| 4 |
|
| 5 |
pipe = pipeline("question-answering")
|
| 6 |
#pipe = pipeline("text-generation")
|
| 7 |
|
| 8 |
st.title("Adrega AI Help")
|
| 9 |
+
dataset = load_dataset("andreska/adregadocs", split="test")
|
| 10 |
+
context = dataset[0]["text"]
|
| 11 |
+
#context = "Adrega is a very cool company, that implements AI. Rett fra Rio is a company that specializes in body waxing and is owned by Cintia" #dataset[0]["text"]
|
| 12 |
|
| 13 |
user_input = st.text_input('Ask me a question')
|
| 14 |
if st.button("Submit"):
|