Spaces:
Paused
Paused
hf
Browse files- app.py +2 -2
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient, login
|
| 3 |
import random
|
| 4 |
-
from
|
| 5 |
from langchain.schema import AIMessage, HumanMessage
|
| 6 |
import os
|
| 7 |
|
| 8 |
login(token=os.environ["HUGGINGFACEHUB_API_TOKEN"])
|
| 9 |
|
| 10 |
-
model = ChatOpenAI(model="
|
| 11 |
|
| 12 |
def predict(message, history):
|
| 13 |
history_langchain_format = []
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient, login
|
| 3 |
import random
|
| 4 |
+
from langchain_huggingface import ChatHuggingFace, HuggingFaceEndpoint, HuggingFacePipeline
|
| 5 |
from langchain.schema import AIMessage, HumanMessage
|
| 6 |
import os
|
| 7 |
|
| 8 |
login(token=os.environ["HUGGINGFACEHUB_API_TOKEN"])
|
| 9 |
|
| 10 |
+
model = ChatOpenAI(model="HuggingFaceH4/zephyr-7b-beta")
|
| 11 |
|
| 12 |
def predict(message, history):
|
| 13 |
history_langchain_format = []
|
requirements.txt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
huggingface_hub==0.25.2
|
| 2 |
-
langchain
|
| 3 |
langgraph
|
|
|
|
| 1 |
huggingface_hub==0.25.2
|
| 2 |
+
langchain-huggingface
|
| 3 |
langgraph
|