Spaces:
Sleeping
Sleeping
Update src/chatbot.py
Browse files- src/chatbot.py +3 -0
src/chatbot.py
CHANGED
|
@@ -25,6 +25,9 @@ class StreamHandler(BaseCallbackHandler):
|
|
| 25 |
print(token, end="", flush=True) # stream to console
|
| 26 |
self.current_text += token
|
| 27 |
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
class BioethicsChatbot:
|
| 30 |
def __init__(self, data_dir: str="data/sample_papers"):
|
|
|
|
| 25 |
print(token, end="", flush=True) # stream to console
|
| 26 |
self.current_text += token
|
| 27 |
|
| 28 |
+
def get_text(self):
|
| 29 |
+
return self.current_text
|
| 30 |
+
|
| 31 |
|
| 32 |
class BioethicsChatbot:
|
| 33 |
def __init__(self, data_dir: str="data/sample_papers"):
|