Spaces:
Sleeping
Sleeping
un-index
commited on
Commit
·
3296004
1
Parent(s):
e9b9296
app.py
CHANGED
|
@@ -130,6 +130,9 @@ def f(context, temperature, top_p, max_length, model_idx):
|
|
| 130 |
return generator(context, max_length=max_length, top_p=top_p, temperature=temperature, num_return_sequences=1)#[0]['generated-text']
|
| 131 |
# args found in the source: https://github.com/huggingface/transformers/blob/27b3031de2fb8195dec9bc2093e3e70bdb1c4bff/src/transformers/generation_tf_utils.py#L348-L376
|
| 132 |
|
|
|
|
|
|
|
|
|
|
| 133 |
except Exception as e:
|
| 134 |
return f"error with idx{model_idx} : \n"+str(e)
|
| 135 |
|
|
|
|
| 130 |
return generator(context, max_length=max_length, top_p=top_p, temperature=temperature, num_return_sequences=1)#[0]['generated-text']
|
| 131 |
# args found in the source: https://github.com/huggingface/transformers/blob/27b3031de2fb8195dec9bc2093e3e70bdb1c4bff/src/transformers/generation_tf_utils.py#L348-L376
|
| 132 |
|
| 133 |
+
# use fallback gpt-2 inference api for this as well
|
| 134 |
+
|
| 135 |
+
|
| 136 |
except Exception as e:
|
| 137 |
return f"error with idx{model_idx} : \n"+str(e)
|
| 138 |
|