yajingchen commited on
Commit
18f540d
·
1 Parent(s): 41e2751

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -16,7 +16,7 @@ tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
16
  model = PeftModel.from_pretrained(model, peft_model_id)
17
 
18
 
19
- def make_inference(product, description):
20
  batch = tokenizer(
21
  f"Below is a travel destination and description, please write a marketing email for this travel spot.\n\n### Travel Destination:\n{travel_destination}\n### Description:\n{description}\n\n### Marketing Email",
22
  return_tensors="pt",
@@ -35,10 +35,10 @@ if __name__ == "__main__":
35
  gr.Interface(
36
  make_inference,
37
  [
38
- gr.inputs.Textbox(lines=2, label="Product Name"),
39
- gr.inputs.Textbox(lines=5, label="Product Description"),
40
  ],
41
  gr.outputs.Textbox(label="Ad"),
42
  title="TravelDestination-MarketMail-AI",
43
- description="TravelDestination-MarketMail-AI is a tool that generates marketing emails for different popular travel sites.",
44
  ).launch()
 
16
  model = PeftModel.from_pretrained(model, peft_model_id)
17
 
18
 
19
+ def make_inference(travel_destination, description):
20
  batch = tokenizer(
21
  f"Below is a travel destination and description, please write a marketing email for this travel spot.\n\n### Travel Destination:\n{travel_destination}\n### Description:\n{description}\n\n### Marketing Email",
22
  return_tensors="pt",
 
35
  gr.Interface(
36
  make_inference,
37
  [
38
+ gr.inputs.Textbox(lines=2, label="Travel Destination"),
39
+ gr.inputs.Textbox(lines=5, label="One Line Description"),
40
  ],
41
  gr.outputs.Textbox(label="Ad"),
42
  title="TravelDestination-MarketMail-AI",
43
+ description="TravelDestination-MarketMail-AI is a tool that generates marketing emails based off one travel destination name and a short line of description",
44
  ).launch()