Ctaake commited on
Commit
6e064fb
·
verified ·
1 Parent(s): 036e7d1

Removed additional inputs

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  from huggingface_hub import InferenceClient
3
  from transformers import AutoTokenizer
4
  import random
 
5
 
6
  # Model which is used
7
  checkpoint = "mistralai/Mistral-7B-Instruct-v0.2"
@@ -29,7 +30,7 @@ def format_prompt(message, history, systemPrompt):
29
  return messages
30
 
31
 
32
- def inference(message, history, systemPrompt, temperature, maxTokens, topP, repPenalty):
33
  # Updating the settings for the generation
34
  client_settings = dict(
35
  temperature=temperature,
@@ -134,7 +135,7 @@ gr.ChatInterface(
134
  textbox=myTextInput,
135
  title="My chat bot",
136
  theme=myTheme,
137
- additional_inputs=myAdditionalInputs,
138
  submit_btn=mySubmitButton,
139
  stop_btn="STOP",
140
  retry_btn=myRetryButton,
 
2
  from huggingface_hub import InferenceClient
3
  from transformers import AutoTokenizer
4
  import random
5
+ from mySystemPrompt import SYSTEM_PROMPT
6
 
7
  # Model which is used
8
  checkpoint = "mistralai/Mistral-7B-Instruct-v0.2"
 
30
  return messages
31
 
32
 
33
+ def inference(message, history, systemPrompt=SYSTEM_PROMPT, temperature=0.9, maxTokens=512, topP=0.9, repPenalty=1.1):
34
  # Updating the settings for the generation
35
  client_settings = dict(
36
  temperature=temperature,
 
135
  textbox=myTextInput,
136
  title="My chat bot",
137
  theme=myTheme,
138
+ #additional_inputs=myAdditionalInputs,
139
  submit_btn=mySubmitButton,
140
  stop_btn="STOP",
141
  retry_btn=myRetryButton,