Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -79,10 +79,6 @@ def text_splitter(text):
|
|
| 79 |
chunks=text_splitter.split_documents(text)
|
| 80 |
return chunks
|
| 81 |
|
| 82 |
-
#GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
|
| 83 |
-
#COHERE_API_KEY = os.getenv("COHERE_API_KEY")
|
| 84 |
-
#HUGGINGFACE_API_KEY = os.getenv("HUGGINGFACE_API_KEY")
|
| 85 |
-
|
| 86 |
def get_conversational_chain(retriever):
|
| 87 |
prompt_template = """
|
| 88 |
Given the following extracted parts of a long document and a question, create a final answer.
|
|
@@ -104,9 +100,9 @@ def get_conversational_chain(retriever):
|
|
| 104 |
|
| 105 |
|
| 106 |
llm = HuggingFaceHub(
|
| 107 |
-
|
| 108 |
#repo_id = "mistralai/Mistral-7B-v0.1",
|
| 109 |
-
repo_id="microsoft/Phi-3-mini-128k-instruct",
|
| 110 |
huggingfacehub_api_token=os.getenv("HUGGINGFACE_API_KEY"),
|
| 111 |
task="text-generation",
|
| 112 |
)
|
|
|
|
| 79 |
chunks=text_splitter.split_documents(text)
|
| 80 |
return chunks
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
def get_conversational_chain(retriever):
|
| 83 |
prompt_template = """
|
| 84 |
Given the following extracted parts of a long document and a question, create a final answer.
|
|
|
|
| 100 |
|
| 101 |
|
| 102 |
llm = HuggingFaceHub(
|
| 103 |
+
repo_id="HuggingFaceH4/zephyr-7b-beta",
|
| 104 |
#repo_id = "mistralai/Mistral-7B-v0.1",
|
| 105 |
+
#repo_id="microsoft/Phi-3-mini-128k-instruct",
|
| 106 |
huggingfacehub_api_token=os.getenv("HUGGINGFACE_API_KEY"),
|
| 107 |
task="text-generation",
|
| 108 |
)
|