M17idd commited on
Commit
6e983eb
·
verified ·
1 Parent(s): 0e924d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -46,12 +46,13 @@ def generate_report(operation_data, max_tokens, temperature, top_p):
46
  HumanMessage(content=f"{system_prompt}\n\n{operation_data}")
47
  ]
48
 
49
- response = llm(messages)
 
50
 
51
  with open("report.txt", "w", encoding="utf-8") as file:
52
  file.write(response.content)
53
 
54
- return response.content, "report.txt"
55
 
56
 
57
  demo = gr.Interface(
 
46
  HumanMessage(content=f"{system_prompt}\n\n{operation_data}")
47
  ]
48
 
49
+ response = llm.invoke(messages)
50
+ report_text = response.content
51
 
52
  with open("report.txt", "w", encoding="utf-8") as file:
53
  file.write(response.content)
54
 
55
+ return response.content, report_text
56
 
57
 
58
  demo = gr.Interface(