umair894 commited on
Commit
aa15d9c
·
verified ·
1 Parent(s): be2e0a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -71,6 +71,7 @@ def start_generating(message):
71
  thread = Thread(target=model.generate,kwargs={"input_ids": inputs,
72
  "streamer": streamer, "max_new_tokens": 500})
73
  thread.start() # now start the thread
 
74
 
75
 
76
  # for new_text in streamer:
@@ -92,7 +93,7 @@ def echo(message, history):
92
  if chunk is not None:
93
  temp += chunk + ""
94
  yield temp
95
- thread.join()
96
  # username = os.getenv('username')
97
  # password = os.getenv('pass')
98
  demo = gr.ChatInterface(fn=echo, examples=["hello", "hi"], title="llama-3 finetuned")
 
71
  thread = Thread(target=model.generate,kwargs={"input_ids": inputs,
72
  "streamer": streamer, "max_new_tokens": 500})
73
  thread.start() # now start the thread
74
+ thread.join()
75
 
76
 
77
  # for new_text in streamer:
 
93
  if chunk is not None:
94
  temp += chunk + ""
95
  yield temp
96
+ #thread.join()
97
  # username = os.getenv('username')
98
  # password = os.getenv('pass')
99
  demo = gr.ChatInterface(fn=echo, examples=["hello", "hi"], title="llama-3 finetuned")