wop commited on
Commit
9b73777
·
verified ·
1 Parent(s): d040386

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -46,16 +46,14 @@ async def ai(ctx, *, input_text: str):
46
  """Ask our AI model a question. (Session resets every 1 message!)"""\
47
 
48
  try:
49
- client = grc.Client("https://wop-xxx-opengpt.hf.space/")
50
-
51
- # Make a request to the /chat endpoint
52
  result = client.predict(
53
- input_text,
54
- 0.9, # Temperature value between 0.0 and 1.0
55
- 2000, # Max new tokens value between 64 and 4096
56
- 0.9, # Top-p (nucleus sampling) value between 0.0 and 1.0
57
- 1.2, # Repetition penalty value between 1.0 and 2.0
58
- api_name="/chat"
59
  )
60
  result = result[:-4]
61
 
 
46
  """Ask our AI model a question. (Session resets every 1 message!)"""\
47
 
48
  try:
49
+ client = Client("https://wop-xxx-opengpt.hf.space/")
 
 
50
  result = client.predict(
51
+ input_text,
52
+ 0.9,
53
+ 1800,
54
+ 0.9,
55
+ 1.2,
56
+ api_name="/chat"
57
  )
58
  result = result[:-4]
59