chansung commited on
Commit
f745223
1 Parent(s): e66e083

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -1,8 +1,17 @@
 
1
  import torch
2
  import gradio as gr
3
 
4
  from gen import get_pretrained_models, get_output, setup_model_parallel
5
 
 
 
 
 
 
 
 
 
6
  def chat(user_input):
7
  bot_response = "hello world"
8
  response = ""
 
1
+ import os
2
  import torch
3
  import gradio as gr
4
 
5
  from gen import get_pretrained_models, get_output, setup_model_parallel
6
 
7
+ os.environ["RANK"] = "0"
8
+ os.environ["WORKD_SIZE"] = "1"
9
+ os.environ["MASTER_ADDR"] = "127.0.0.1"
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 = "hello world"
17
  response = ""