diginoron commited on
Commit
45e8a69
·
verified ·
1 Parent(s): e7ce7de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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"جدول زیر کشورهایی را نشان می‌دهد که کالا با کد HS {hs_code} را در دوره {period} وارد کرده‌اند:\n"
41
  f"{table_str}\n\n"
42
- "لطفاً بر اساس این اطلاعات دو پاراگراف مشاوره تخصصی بنویسید."
43
  )
44
  print("پرامپت ساخته‌شده:")
45
  print(prompt)
@@ -47,8 +47,8 @@ def provide_advice(table_data: pd.DataFrame, hs_code: str, year: str, month: str
47
  print("در حال فراخوانی مدل mistralai/Mixtral-8x7B-Instruct-v0.1...")
48
  outputs = client.text_generation(
49
  prompt=prompt,
50
- model="mistralai/Mixtral-8x7B-Instruct-v0.1", # مدل جایگزین
51
- max_new_tokens=256
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)
 
47
  print("در حال فراخوانی مدل mistralai/Mixtral-8x7B-Instruct-v0.1...")
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)