AWeirdDev commited on
Commit
cb9be9f
·
verified ·
1 Parent(s): 43d6f9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -19,10 +19,9 @@ class Payload(BaseModel):
19
  stream: bool = False
20
  model: Literal["mistral-7b-instruct-v0.2"] = "mistral-7b-instruct-v0.2"
21
  messages: List[Message]
22
- temperature: float
23
- presence_penalty: float
24
- frequency_penalty: float
25
- top_p: float
26
 
27
  async def stream(iter):
28
  while True:
@@ -74,7 +73,7 @@ async def c_cmp(payload: Payload):
74
  payload.temperature,
75
  4096,
76
  payload.top_p,
77
- payload.presence_penalty,
78
  api_name="/chat"
79
  )
80
  }
@@ -91,7 +90,7 @@ async def c_cmp(payload: Payload):
91
  payload.temperature, # float (numeric value between 0.0 and 1.0) in 'Temperature' Slider component
92
  4096, # float (numeric value between 0 and 1048) in 'Max new tokens' Slider component
93
  payload.top_p, # float (numeric value between 0.0 and 1) in 'Top-p (nucleus sampling)' Slider component
94
- payload.presence_penalty, # float (numeric value between 1.0 and 2.0) in 'Repetition penalty' Slider component
95
  api_name="/chat"
96
  )
97
  for i, item in enumerate(result):
 
19
  stream: bool = False
20
  model: Literal["mistral-7b-instruct-v0.2"] = "mistral-7b-instruct-v0.2"
21
  messages: List[Message]
22
+ temperature: float = 0.9
23
+ frequency_penalty: float = 1.2
24
+ top_p: float = 0.9
 
25
 
26
  async def stream(iter):
27
  while True:
 
73
  payload.temperature,
74
  4096,
75
  payload.top_p,
76
+ payload.frequency_penalty,
77
  api_name="/chat"
78
  )
79
  }
 
90
  payload.temperature, # float (numeric value between 0.0 and 1.0) in 'Temperature' Slider component
91
  4096, # float (numeric value between 0 and 1048) in 'Max new tokens' Slider component
92
  payload.top_p, # float (numeric value between 0.0 and 1) in 'Top-p (nucleus sampling)' Slider component
93
+ payload.frequency_penalty, # float (numeric value between 1.0 and 2.0) in 'Repetition penalty' Slider component
94
  api_name="/chat"
95
  )
96
  for i, item in enumerate(result):