kreem22 commited on
Commit
fe37750
1 Parent(s): e245739

Update MistralaiChat.py

Browse files
Files changed (1) hide show
  1. MistralaiChat.py +1 -6
MistralaiChat.py CHANGED
@@ -1,7 +1,6 @@
1
  from huggingface_hub import InferenceClient
2
  import gradio as gr
3
  import random
4
- import FileUtil
5
 
6
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
7
 
@@ -20,9 +19,7 @@ def generate(
20
  prompt, history, system_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0,
21
  ):
22
 
23
- hist_len = len(history)
24
- if hist_len == 0:
25
- history = FileUtil.read_from_file("history.bin")
26
 
27
  temperature = float(temperature)
28
  if temperature < 1e-2:
@@ -44,8 +41,6 @@ def generate(
44
  return_full_text=False)
45
  output = ""
46
 
47
- FileUtil.write_to_file(history, 'history.bin')
48
-
49
  for response in stream:
50
  output += response.token.text
51
  yield output
 
1
  from huggingface_hub import InferenceClient
2
  import gradio as gr
3
  import random
 
4
 
5
  client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
6
 
 
19
  prompt, history, system_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0,
20
  ):
21
 
22
+
 
 
23
 
24
  temperature = float(temperature)
25
  if temperature < 1e-2:
 
41
  return_full_text=False)
42
  output = ""
43
 
 
 
44
  for response in stream:
45
  output += response.token.text
46
  yield output