Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -37,9 +37,9 @@ def provide_advice(table_data: pd.DataFrame, hs_code: str, year: str, month: str
|
|
37 |
table_str = table_data.to_string(index=False)
|
38 |
period = f"{year}/{int(month):02d}"
|
39 |
prompt = (
|
40 |
-
f"
|
41 |
f"{table_str}\n\n"
|
42 |
-
f"
|
43 |
)
|
44 |
print("پرامپت ساختهشده:")
|
45 |
print(prompt)
|
@@ -48,7 +48,7 @@ def provide_advice(table_data: pd.DataFrame, hs_code: str, year: str, month: str
|
|
48 |
outputs = client.text_generation(
|
49 |
prompt=prompt,
|
50 |
model="mistralai/Mixtral-8x7B-Instruct-v0.1",
|
51 |
-
max_new_tokens=512
|
52 |
)
|
53 |
print("خروجی مدل دریافت شد:")
|
54 |
print(outputs)
|
|
|
37 |
table_str = table_data.to_string(index=False)
|
38 |
period = f"{year}/{int(month):02d}"
|
39 |
prompt = (
|
40 |
+
f"The following table shows countries that imported a product with HS code {hs_code} during the period {period}:\n"
|
41 |
f"{table_str}\n\n"
|
42 |
+
f"Please provide a detailed analysis in two complete paragraphs. The first paragraph should discuss the market opportunities and potential demand for this product in these countries. The second paragraph should offer strategic recommendations for exporters targeting these markets, focusing on trade strategies and risk management."
|
43 |
)
|
44 |
print("پرامپت ساختهشده:")
|
45 |
print(prompt)
|
|
|
48 |
outputs = client.text_generation(
|
49 |
prompt=prompt,
|
50 |
model="mistralai/Mixtral-8x7B-Instruct-v0.1",
|
51 |
+
max_new_tokens=512 # افزایش طول خروجی
|
52 |
)
|
53 |
print("خروجی مدل دریافت شد:")
|
54 |
print(outputs)
|