jdesiree commited on
Commit
8ee68cc
·
verified ·
1 Parent(s): 1f68885

Updated depreciated imports.

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,11 +1,11 @@
1
  import gradio as gr
2
  from langchain.prompts import ChatPromptTemplate
3
- from langchain_community.llms import HuggingFaceHub
4
  from langchain.schema import HumanMessage, SystemMessage
5
  import os
6
 
7
  # Set up the LangChain model (using the same Zephyr model)
8
- llm = HuggingFaceHub(
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
  )