Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,10 @@ os.environ["MASTER_ADDR"] = "127.0.0.1"
|
|
10 |
os.environ["MASTER_PORT"] = "50505"
|
11 |
|
12 |
local_rank, world_size = setup_model_parallel()
|
13 |
-
|
14 |
|
15 |
def chat(user_input):
|
16 |
-
bot_response =
|
17 |
response = ""
|
18 |
for word in bot_response.split(" "):
|
19 |
response += word + " "
|
|
|
10 |
os.environ["MASTER_PORT"] = "50505"
|
11 |
|
12 |
local_rank, world_size = setup_model_parallel()
|
13 |
+
generator = get_pretrained_models("7B", "tokenizer")
|
14 |
|
15 |
def chat(user_input):
|
16 |
+
bot_response = get_output(generator, user_input)[0]
|
17 |
response = ""
|
18 |
for word in bot_response.split(" "):
|
19 |
response += word + " "
|