Vaibhavbrkn commited on
Commit
d476ff2
Β·
1 Parent(s): dfabef6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -80,8 +80,7 @@ def func(context, slide):
80
  if temp > 0:
81
  for i in range(temp):
82
  keyword = random.choice(ap)
83
- inputs = "context: " + context + \
84
- " keyword: " + keyword[0]
85
  source_tokenizer = tokenizer.encode_plus(
86
  inputs, max_length=512, pad_to_max_length=True, return_tensors="pt")
87
  outs = model.generate(input_ids=source_tokenizer['input_ids'].to(
@@ -103,4 +102,4 @@ gr.Interface(func,
103
  gr.inputs.Slider(minimum=1, maximum=5,
104
  default=3, label="No of Question"),
105
  ],
106
- gr.outputs.KeyValues(), capture_session=True, server_name="0.0.0.0").launch()
 
80
  if temp > 0:
81
  for i in range(temp):
82
  keyword = random.choice(ap)
83
+ inputs = "context: " + context + \\n " keyword: " + keyword[0]
 
84
  source_tokenizer = tokenizer.encode_plus(
85
  inputs, max_length=512, pad_to_max_length=True, return_tensors="pt")
86
  outs = model.generate(input_ids=source_tokenizer['input_ids'].to(
 
102
  gr.inputs.Slider(minimum=1, maximum=5,
103
  default=3, label="No of Question"),
104
  ],
105
+ gr.outputs.KeyValues(), capture_session=True).launch()