Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import json
|
|
7 |
#import torch
|
8 |
import pandas as pd
|
9 |
from llama_cpp import Llama
|
10 |
-
from langchain_community.llms import LlamaCpp
|
11 |
from threading import Thread
|
12 |
from huggingface_hub import Repository, upload_file
|
13 |
import os
|
@@ -121,11 +121,11 @@ def talk(prompt, history):
|
|
121 |
# return(stream['choices'][0]['message']['content'])
|
122 |
text = ""
|
123 |
for output in stream:
|
124 |
-
text += output['choices']['message']['content']
|
125 |
print(f"{output}")
|
126 |
print("check3H")
|
127 |
print(text)
|
128 |
-
|
129 |
# text.append(output['choices'][0])
|
130 |
# print(f"{text}")
|
131 |
# yield "".join(text)
|
|
|
7 |
#import torch
|
8 |
import pandas as pd
|
9 |
from llama_cpp import Llama
|
10 |
+
#from langchain_community.llms import LlamaCpp
|
11 |
from threading import Thread
|
12 |
from huggingface_hub import Repository, upload_file
|
13 |
import os
|
|
|
121 |
# return(stream['choices'][0]['message']['content'])
|
122 |
text = ""
|
123 |
for output in stream:
|
124 |
+
text += output['choices'][0]['message']['content']
|
125 |
print(f"{output}")
|
126 |
print("check3H")
|
127 |
print(text)
|
128 |
+
yield text
|
129 |
# text.append(output['choices'][0])
|
130 |
# print(f"{text}")
|
131 |
# yield "".join(text)
|