Spaces:
Build error
Build error
Daniel Marques
commited on
Commit
·
46d132d
1
Parent(s):
c77782f
feat: add history
Browse files- run_localGPT.py +5 -0
run_localGPT.py
CHANGED
|
@@ -99,6 +99,11 @@ def load_model(device_type, model_id, model_basename=None, LOGGING=logging):
|
|
| 99 |
local_llm = HuggingFacePipeline(pipeline=pipe)
|
| 100 |
logging.info("Local LLM Loaded")
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
return local_llm
|
| 103 |
|
| 104 |
|
|
|
|
| 99 |
local_llm = HuggingFacePipeline(pipeline=pipe)
|
| 100 |
logging.info("Local LLM Loaded")
|
| 101 |
|
| 102 |
+
generated_text = ""
|
| 103 |
+
for new_text in streamer:
|
| 104 |
+
generated_text += new_text
|
| 105 |
+
print(generated_text)
|
| 106 |
+
|
| 107 |
return local_llm
|
| 108 |
|
| 109 |
|