M17idd commited on
Commit
270634e
·
verified ·
1 Parent(s): 724300f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -47,14 +47,11 @@ def generate_report(operation_data, max_tokens, temperature, top_p):
47
  HumanMessage(content=f"{system_prompt}\n\n{operation_data}")
48
  ]
49
 
50
- # ارسال پیام به مدل و گرفتن پاسخ
51
  response = llm(messages)
52
 
53
- # ذخیره گزارش در یک فایل متنی
54
- with open("report.txt", "w", encoding="utf-8") as file:
55
- file.write(response.content)
56
 
57
- return response.content, "report.txt" # لینک به فایل متنی برای دانلود
58
 
59
  demo = gr.Interface(
60
  fn=generate_report,
 
47
  HumanMessage(content=f"{system_prompt}\n\n{operation_data}")
48
  ]
49
 
 
50
  response = llm(messages)
51
 
52
+
 
 
53
 
54
+ return response.content
55
 
56
  demo = gr.Interface(
57
  fn=generate_report,