Update app.py
Browse files
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
|
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,
|