BifrostTitan commited on
Commit
11d8028
·
verified ·
1 Parent(s): 07b385f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -65,7 +65,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_id)
65
  hf_save_dir = "./bitnet"
66
  model = AutoModelForCausalLM.from_pretrained(
67
  model_id,
68
- torch_dtype=torch.bfloat32
69
  device_map="auto"
70
  )
71
  device = model.device
@@ -222,4 +222,5 @@ with gr.Blocks() as demo:
222
  generation_output = gr.Textbox(label="Generated Output", lines=10)
223
  generate_button.click(fn=generate_text_from_prompt, inputs=instruction_input, outputs=generation_output)
224
 
225
- demo.launch()
 
 
65
  hf_save_dir = "./bitnet"
66
  model = AutoModelForCausalLM.from_pretrained(
67
  model_id,
68
+ torch_dtype=torch.bfloat32,
69
  device_map="auto"
70
  )
71
  device = model.device
 
222
  generation_output = gr.Textbox(label="Generated Output", lines=10)
223
  generate_button.click(fn=generate_text_from_prompt, inputs=instruction_input, outputs=generation_output)
224
 
225
+ if __name__ == "__main__":
226
+ demo.launch()