mohamedemam commited on
Commit
9e90329
·
1 Parent(s): 65cae45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,10 +21,10 @@ model.eval()
21
  # Function to generate questions and answers with configurable parameters
22
  def generate_qa(context, temperature, top_p,num_seq,l_p, num_b):
23
  input_text = context+f"\n\nSummarize the previous text in three sentences in arabic:\n\n"
24
- input_ids = tokenizer(text=input_text, return_tensors='pt')
25
 
26
  # Generate with configurable parameters
27
- output = model.generate(input_ids['input_ids'],
28
  temperature=temperature,
29
  top_p=top_p,
30
  num_return_sequences=num_seq,
 
21
  # Function to generate questions and answers with configurable parameters
22
  def generate_qa(context, temperature, top_p,num_seq,l_p, num_b):
23
  input_text = context+f"\n\nSummarize the previous text in three sentences in arabic:\n\n"
24
+ a = tokenizer(text=input_text, return_tensors='pt')
25
 
26
  # Generate with configurable parameters
27
+ output = model.generate(input_ids=a['input_ids'],
28
  temperature=temperature,
29
  top_p=top_p,
30
  num_return_sequences=num_seq,