viethoangtranduong commited on
Commit
a74e752
1 Parent(s): 9bba9ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -11,7 +11,10 @@ headers = {
11
  def return_text(txt):
12
  response = requests.post(API_URL, headers=headers, json={
13
  "inputs": txt,
14
- "parameters": {}
 
 
 
15
  })
16
  return response.json()[0]['generated_text']
17
 
@@ -21,7 +24,7 @@ demo = gr.Blocks()
21
  with demo:
22
  gr.Markdown(
23
  """
24
- # Generate text with default parameters!
25
  Start typing below to see the output.
26
  """
27
  )
 
11
  def return_text(txt):
12
  response = requests.post(API_URL, headers=headers, json={
13
  "inputs": txt,
14
+ "parameters": {
15
+ "temperature": 0.7,
16
+ "max_new_tokens": 512
17
+ }
18
  })
19
  return response.json()[0]['generated_text']
20
 
 
24
  with demo:
25
  gr.Markdown(
26
  """
27
+ # Generate text from snorkelai/Snorkel-Mistral-PairRM-DPO with default parameters!
28
  Start typing below to see the output.
29
  """
30
  )