cahya commited on
Commit
b0d300a
1 Parent(s): 80d2e5c

Updated story to gpt2-medium

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -21,8 +21,8 @@ MODELS = {
21
  "GPT-2 Small finetuned on Indonesian academic journals": {
22
  "url": "https://api-inference.huggingface.co/models/Galuh/id-journal-gpt2"
23
  },
24
- "GPT-2 Small finetuned on Indonesian stories": {
25
- "url": "https://api-inference.huggingface.co/models/cahya/gpt2-small-indonesian-story"
26
  },
27
  }
28
 
@@ -101,7 +101,7 @@ top_k = st.sidebar.number_input(
101
 
102
  top_p = st.sidebar.number_input(
103
  "Top p",
104
- value=1.0,
105
  help=" If set to float < 1, only the most probable tokens with probabilities that add up to top_p or higher are kept for generation."
106
  )
107
 
@@ -123,13 +123,13 @@ model_name = st.selectbox('Model',([
123
  'GPT-2 Small',
124
  'GPT-2 Medium',
125
  'GPT-2 Small finetuned on Indonesian academic journals',
126
- 'GPT-2 Small finetuned on Indonesian stories']))
127
 
128
  if model_name in ["GPT-2 Small", "GPT-2 Medium"]:
129
  prompt_group_name = "GPT-2"
130
  elif model_name in ["GPT-2 Small finetuned on Indonesian academic journals"]:
131
  prompt_group_name = "Indonesian Journals"
132
- elif model_name in ["GPT-2 Small finetuned on Indonesian stories"]:
133
  prompt_group_name = "Indonesian Stories"
134
 
135
  session_state = SessionState.get(prompt=None, prompt_box=None, text=None)
 
21
  "GPT-2 Small finetuned on Indonesian academic journals": {
22
  "url": "https://api-inference.huggingface.co/models/Galuh/id-journal-gpt2"
23
  },
24
+ "GPT-2 Medium finetuned on Indonesian stories": {
25
+ "url": "https://api-inference.huggingface.co/models/cahya/gpt2-medium-indonesian-story"
26
  },
27
  }
28
 
 
101
 
102
  top_p = st.sidebar.number_input(
103
  "Top p",
104
+ value=0.95,
105
  help=" If set to float < 1, only the most probable tokens with probabilities that add up to top_p or higher are kept for generation."
106
  )
107
 
 
123
  'GPT-2 Small',
124
  'GPT-2 Medium',
125
  'GPT-2 Small finetuned on Indonesian academic journals',
126
+ 'GPT-2 Medium finetuned on Indonesian stories']))
127
 
128
  if model_name in ["GPT-2 Small", "GPT-2 Medium"]:
129
  prompt_group_name = "GPT-2"
130
  elif model_name in ["GPT-2 Small finetuned on Indonesian academic journals"]:
131
  prompt_group_name = "Indonesian Journals"
132
+ elif model_name in ["GPT-2 Medium finetuned on Indonesian stories"]:
133
  prompt_group_name = "Indonesian Stories"
134
 
135
  session_state = SessionState.get(prompt=None, prompt_box=None, text=None)