diginoron commited on
Commit
4d460a5
·
verified ·
1 Parent(s): f7132ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- 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)