Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -73,27 +73,16 @@ def start_generating(message):
|
|
73 |
thread.start() # now start the thread
|
74 |
thread.join()
|
75 |
|
76 |
-
|
77 |
-
# for new_text in streamer:
|
78 |
-
|
79 |
-
# print(new_text, end="")
|
80 |
-
|
81 |
-
|
82 |
-
# thread.join() # join our thread
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
def echo(message, history):
|
89 |
start_generating(message)
|
90 |
|
91 |
temp = ''
|
92 |
for chunk in streamer:
|
93 |
-
if chunk is not None:
|
94 |
-
|
|
|
95 |
yield temp
|
96 |
-
|
97 |
# username = os.getenv('username')
|
98 |
# password = os.getenv('pass')
|
99 |
demo = gr.ChatInterface(fn=echo, examples=["hello", "hi"], title="llama-3 finetuned")
|
|
|
73 |
thread.start() # now start the thread
|
74 |
thread.join()
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
def echo(message, history):
|
77 |
start_generating(message)
|
78 |
|
79 |
temp = ''
|
80 |
for chunk in streamer:
|
81 |
+
#if chunk is not None:
|
82 |
+
temp += chunk + ""
|
83 |
+
print(chunk, end="")
|
84 |
yield temp
|
85 |
+
|
86 |
# username = os.getenv('username')
|
87 |
# password = os.getenv('pass')
|
88 |
demo = gr.ChatInterface(fn=echo, examples=["hello", "hi"], title="llama-3 finetuned")
|