VanguardAI commited on
Commit
281c481
·
verified ·
1 Parent(s): 0aadce7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -14,7 +14,7 @@ model, tokenizer = FastLanguageModel.from_pretrained(
14
  load_in_4bit = True,
15
  token= READ_HF
16
  )
17
- FastLanguageModel.for_inference(model) # Enable native 2x faster inference
18
 
19
 
20
  alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
@@ -77,7 +77,7 @@ Category List : ["Dairy & Eggs", "Beverages & Snacks", "Cleaning & Hygiene", "Gr
77
 
78
  @spaces.GPU()
79
  def chunk_it(inventory_list, user_input_text):
80
- model.to('cuda')
81
  inputs = tokenizer(
82
  [
83
  alpaca_prompt.format(
@@ -104,7 +104,7 @@ iface = gr.Interface(
104
  gr.Textbox(label="user_input_text", lines=3),
105
  gr.Textbox(label="inventory_list", lines=5)
106
  ],
107
- outputs="text",
108
  title="Testing",
109
  )
110
 
 
14
  load_in_4bit = True,
15
  token= READ_HF
16
  )
17
+
18
 
19
 
20
  alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
 
77
 
78
  @spaces.GPU()
79
  def chunk_it(inventory_list, user_input_text):
80
+ FastLanguageModel.for_inference(model) # Enable native 2x faster inference
81
  inputs = tokenizer(
82
  [
83
  alpaca_prompt.format(
 
104
  gr.Textbox(label="user_input_text", lines=3),
105
  gr.Textbox(label="inventory_list", lines=5)
106
  ],
107
+ outputs=gr.Textbox(label="output", lines=23),
108
  title="Testing",
109
  )
110