KingNish commited on
Commit
9a6e691
β€’
1 Parent(s): 336ed2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
4
 
5
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
6
 
7
- system_instructions = "You will be provided with text, and your task is to classify task tasks are (text generation, image generation, pdf chat, image text to text, image classification, summarization, translation , tts) answer with only task do not say anything else and stop as soon as possible."
8
 
9
 
10
  def classify_task(prompt):
@@ -17,7 +17,7 @@ def classify_task(prompt):
17
  seed=42,
18
  )
19
 
20
- formatted_prompt = system_instructions + prompt
21
  stream = client.text_generation(
22
  formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
23
  output = ""
 
4
 
5
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
6
 
7
+ system_instructions = "[SYSTEM] You will be provided with text, and your task is to classify task tasks are (text generation, image generation, pdf chat, image text to text, image classification, summarization, translation , tts) answer with only task do not say anything else and stop as soon as possible. [USER]"
8
 
9
 
10
  def classify_task(prompt):
 
17
  seed=42,
18
  )
19
 
20
+ formatted_prompt = system_instructions + prompt + "[BOT]"
21
  stream = client.text_generation(
22
  formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
23
  output = ""