KingNish commited on
Commit
cbf4cd7
1 Parent(s): 383cfb9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -2,9 +2,9 @@ import re
2
  import gradio as gr
3
  from huggingface_hub import InferenceClient
4
 
5
- client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
6
 
7
- system_instructions = "[SYSTEM] You are the Best AI, you can solve complex problems you answer in short , simple and easy language.[USER]"
8
 
9
  def text(prompt):
10
  generate_kwargs = dict(
@@ -16,8 +16,8 @@ def text(prompt):
16
  seed=42,
17
  )
18
 
19
- formatted_prompt = system_instructions + prompt + "[BOT]"
20
- stream = client.text_generation(
21
  formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
22
  output = ""
23
 
 
2
  import gradio as gr
3
  from huggingface_hub import InferenceClient
4
 
5
+ client2 = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
6
 
7
+ system_instructions2 = "[SYSTEM] You are the Best AI, you can solve complex problems you answer in short , simple and easy language.[USER]"
8
 
9
  def text(prompt):
10
  generate_kwargs = dict(
 
16
  seed=42,
17
  )
18
 
19
+ formatted_prompt = system_instructions2 + prompt + "[BOT]"
20
+ stream = client2.text_generation(
21
  formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
22
  output = ""
23