M17idd commited on
Commit
746d10f
·
verified ·
1 Parent(s): 8c709d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -631,7 +631,6 @@ if query:
631
  ])
632
 
633
 
634
- from transformers import SystemMessage, HumanMessage
635
 
636
  if summarized_text:
637
  prompt = f"""
@@ -646,12 +645,8 @@ if summarized_text:
646
  """
647
 
648
  # ارسال پیام به مدل به صورت صحیح
649
- response = llm([
650
- SystemMessage(content="You are a helpful assistant."),
651
- HumanMessage(content=prompt)
652
- ])
653
 
654
- # پاکسازی و اصلاح متن پاسخ
655
  rewritten = clean_text(response['generated_text'].strip()) # اگر خروجی به صورت دیکشنری باشد
656
 
657
  # نمایش نتیجه
 
631
  ])
632
 
633
 
 
634
 
635
  if summarized_text:
636
  prompt = f"""
 
645
  """
646
 
647
  # ارسال پیام به مدل به صورت صحیح
648
+ response = llm([prompt])
 
 
 
649
 
 
650
  rewritten = clean_text(response['generated_text'].strip()) # اگر خروجی به صورت دیکشنری باشد
651
 
652
  # نمایش نتیجه