PayPeer commited on
Commit
b39d6d1
·
1 Parent(s): b057d48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -9,8 +9,8 @@ from langchain.chains import ConversationChain
9
  from langchain.chains.conversation.memory import ConversationBufferWindowMemory
10
  import os
11
 
12
- # from langchain.llms import Runnable
13
- from langchain.llms import HuggingFaceInference
14
 
15
 
16
  # Access environment variables
@@ -34,8 +34,8 @@ def gradio_client_interaction(prompt):
34
  result = client.predict(prompt, prompt, api_name="/predict")
35
  return result['data'][0] # Assuming the response format
36
 
37
- # class GradioLLM(Runnable):
38
- class GradioLLM(HuggingFaceInference):
39
  def __init__(self, client_url):
40
  super().__init__() # Call the constructor of Runnable if necessary
41
  self.client = Client(client_url)
 
9
  from langchain.chains.conversation.memory import ConversationBufferWindowMemory
10
  import os
11
 
12
+ from langchain.schema import Runnable
13
+ # from langchain.llms import HuggingFaceInference
14
 
15
 
16
  # Access environment variables
 
34
  result = client.predict(prompt, prompt, api_name="/predict")
35
  return result['data'][0] # Assuming the response format
36
 
37
+ class GradioLLM(Runnable):
38
+ # class GradioLLM(HuggingFaceInference):
39
  def __init__(self, client_url):
40
  super().__init__() # Call the constructor of Runnable if necessary
41
  self.client = Client(client_url)