methodya commited on
Commit
45db3b4
1 Parent(s): 60bdb31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -14,7 +14,7 @@ def summarize(text, max_length=150, num_beams=7, length_penalty=0.8):
14
  length_penalty = float(length_penalty)
15
 
16
  # تجهيز البيانات للنموذج
17
- inputs = tokenizer(text, return_tensors="pt", max_length=2048, truncation=True)
18
  outputs = model.generate(
19
  **inputs,
20
  max_length=max_length,
@@ -40,3 +40,4 @@ interface = gr.Interface(
40
 
41
  # تشغيل التطبيق
42
  interface.launch()
 
 
14
  length_penalty = float(length_penalty)
15
 
16
  # تجهيز البيانات للنموذج
17
+ inputs = tokenizer(text, return_tensors="pt", max_length=2048, truncation=True)
18
  outputs = model.generate(
19
  **inputs,
20
  max_length=max_length,
 
40
 
41
  # تشغيل التطبيق
42
  interface.launch()
43
+