Spaces:
Sleeping
Sleeping
Updated depreciated imports.
Browse files
app.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from langchain.prompts import ChatPromptTemplate
|
| 3 |
-
from
|
| 4 |
from langchain.schema import HumanMessage, SystemMessage
|
| 5 |
import os
|
| 6 |
|
| 7 |
# Set up the LangChain model (using the same Zephyr model)
|
| 8 |
-
llm =
|
| 9 |
repo_id="HuggingFaceH4/zephyr-7b-beta",
|
| 10 |
model_kwargs={"temperature": 0.7, "max_length": 512}
|
| 11 |
)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from langchain.prompts import ChatPromptTemplate
|
| 3 |
+
from langchain_huggingface import HuggingFaceEndpoint
|
| 4 |
from langchain.schema import HumanMessage, SystemMessage
|
| 5 |
import os
|
| 6 |
|
| 7 |
# Set up the LangChain model (using the same Zephyr model)
|
| 8 |
+
llm = HuggingFaceEndpoint(
|
| 9 |
repo_id="HuggingFaceH4/zephyr-7b-beta",
|
| 10 |
model_kwargs={"temperature": 0.7, "max_length": 512}
|
| 11 |
)
|