doc str
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
from haystack.document_stores import FAISSDocumentStore
|
| 4 |
-
from haystack.nodes import EmbeddingRetriever
|
| 5 |
import numpy as np
|
| 6 |
import openai
|
| 7 |
import os
|
|
@@ -24,7 +24,7 @@ def gen_conv(query: str, report_type, history=[system_template], ipcc=True):
|
|
| 24 |
"""return (answer:str, history:list[dict], sources:str)
|
| 25 |
|
| 26 |
Args:
|
| 27 |
-
query (str):
|
| 28 |
history (list, optional): _description_. Defaults to [system_template].
|
| 29 |
ipcc (bool, optional): _description_. Defaults to True.
|
| 30 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
from haystack.document_stores import FAISSDocumentStore
|
| 4 |
+
from haystack.nodes import EmbeddingRetriever, SentenceTransformersRanker
|
| 5 |
import numpy as np
|
| 6 |
import openai
|
| 7 |
import os
|
|
|
|
| 24 |
"""return (answer:str, history:list[dict], sources:str)
|
| 25 |
|
| 26 |
Args:
|
| 27 |
+
query (str): the user message
|
| 28 |
history (list, optional): _description_. Defaults to [system_template].
|
| 29 |
ipcc (bool, optional): _description_. Defaults to True.
|
| 30 |
|