Spaces:
Runtime error
Runtime error
rasmus1610
commited on
Commit
•
8a31a6b
1
Parent(s):
390386d
made model deterministic with temperature=0
Browse files- __pycache__/app.cpython-310.pyc +0 -0
- __pycache__/llm.cpython-310.pyc +0 -0
- __pycache__/qa.cpython-310.pyc +0 -0
- app.py +2 -2
- qa.py +1 -1
__pycache__/app.cpython-310.pyc
CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
__pycache__/llm.cpython-310.pyc
CHANGED
Binary files a/__pycache__/llm.cpython-310.pyc and b/__pycache__/llm.cpython-310.pyc differ
|
|
__pycache__/qa.cpython-310.pyc
CHANGED
Binary files a/__pycache__/qa.cpython-310.pyc and b/__pycache__/qa.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -12,10 +12,10 @@ from qa import QuestionAnswerer
|
|
12 |
df = pd.read_csv("carotid_embeddings_sentence_transformers_061123.csv")
|
13 |
df["embeddings"] = df.embeddings.apply(ast.literal_eval)
|
14 |
|
15 |
-
qa = QuestionAnswerer(df, SentenceTransformer('thenlper/gte-base'), OpenAILLM('gpt-3.5-turbo-
|
16 |
|
17 |
def gradio_answer(input):
|
18 |
-
return qa.answer_question(input, n=5
|
19 |
|
20 |
desc_string = """
|
21 |
In dieser Demo kannst du einer KI Fragen zum Inhalt der ['S3-Leitlinie Diagnostik, Therapie und Nachsorge der extracraniellen Carotisstenose'](https://register.awmf.org/de/leitlinien/detail/004-028) stellen. Ein paar Beispiel-Fragen findest du unten.
|
|
|
12 |
df = pd.read_csv("carotid_embeddings_sentence_transformers_061123.csv")
|
13 |
df["embeddings"] = df.embeddings.apply(ast.literal_eval)
|
14 |
|
15 |
+
qa = QuestionAnswerer(df, SentenceTransformer('thenlper/gte-base'), OpenAILLM('gpt-3.5-turbo-1106'), CrossEncoder('cross-encoder/ms-marco-TinyBERT-L-2-v2'))
|
16 |
|
17 |
def gradio_answer(input):
|
18 |
+
return qa.answer_question(input, n=5)
|
19 |
|
20 |
desc_string = """
|
21 |
In dieser Demo kannst du einer KI Fragen zum Inhalt der ['S3-Leitlinie Diagnostik, Therapie und Nachsorge der extracraniellen Carotisstenose'](https://register.awmf.org/de/leitlinien/detail/004-028) stellen. Ein paar Beispiel-Fragen findest du unten.
|
qa.py
CHANGED
@@ -87,5 +87,5 @@ class QuestionAnswerer:
|
|
87 |
|
88 |
system_prompt = "You are a helpful assistant answering questions in German. You answer only in German. If you do not know an answer you say it. You do not fabricate answers."
|
89 |
|
90 |
-
return self.llm.get_response(system_prompt, prompt)
|
91 |
|
|
|
87 |
|
88 |
system_prompt = "You are a helpful assistant answering questions in German. You answer only in German. If you do not know an answer you say it. You do not fabricate answers."
|
89 |
|
90 |
+
return self.llm.get_response(system_prompt, prompt, temperature=0)
|
91 |
|