spuuntries commited on
Commit
57e78bc
·
1 Parent(s): e151d4c

fix: add seed random

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  from huggingface_hub import InferenceClient
3
  import sqlite3
4
  import os
 
5
 
6
  client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
7
 
@@ -77,6 +78,7 @@ def respond(
77
  max_tokens=max_tokens,
78
  stream=True,
79
  temperature=temperature,
 
80
  top_p=top_p,
81
  ):
82
  token = message.choices[0].delta.content
 
2
  from huggingface_hub import InferenceClient
3
  import sqlite3
4
  import os
5
+ import random
6
 
7
  client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
8
 
 
78
  max_tokens=max_tokens,
79
  stream=True,
80
  temperature=temperature,
81
+ seed=random.randint(1, 1000),
82
  top_p=top_p,
83
  ):
84
  token = message.choices[0].delta.content