KvrParaskevi commited on
Commit
0e3c31a
1 Parent(s): 0de3a96

Update chatbot_bedrock.py

Browse files
Files changed (1) hide show
  1. chatbot_bedrock.py +1 -10
chatbot_bedrock.py CHANGED
@@ -5,16 +5,7 @@ from langchain.chains import ConversationChain
5
  import langchain.globals
6
  from transformers import AutoModelForCausalLM, AutoTokenizer
7
  import streamlit as st
8
- from abc import ABC, abstractmethod
9
-
10
- class Runnable(ABC):
11
- @abstractmethod
12
- def run(self, input_text):
13
- """
14
- This method should be implemented by any class that inherits from Runnable.
15
- It should accept input text and return processed text or any other result based on the implementation.
16
- """
17
- pass
18
 
19
  class HuggingFaceModelWrapper(Runnable): # Assuming Runnable is the required interface
20
  def __init__(self, model, tokenizer):
 
5
  import langchain.globals
6
  from transformers import AutoModelForCausalLM, AutoTokenizer
7
  import streamlit as st
8
+ from langchain_core.runnables.base import Runnable
 
 
 
 
 
 
 
 
 
9
 
10
  class HuggingFaceModelWrapper(Runnable): # Assuming Runnable is the required interface
11
  def __init__(self, model, tokenizer):