Spaces:
Runtime error
Runtime error
update error message
Browse files
app.py
CHANGED
@@ -187,6 +187,9 @@ def docgen_func(function_code, min_length, max_length, top_k, top_p, temp, repet
|
|
187 |
if type(output) is list:
|
188 |
return f'"""\n{" || ".join(output[0]["generated_text"].split("|"))}\n"""'
|
189 |
else:
|
|
|
|
|
|
|
190 |
return str(output)
|
191 |
|
192 |
iface = gr.Interface(
|
|
|
187 |
if type(output) is list:
|
188 |
return f'"""\n{" || ".join(output[0]["generated_text"].split("|"))}\n"""'
|
189 |
else:
|
190 |
+
msg = str(output)
|
191 |
+
if msg == "{'error': 'Model stmnk/codet5-small-code-summarization-python is currently loading', 'estimated_time': 20}":
|
192 |
+
return msg + '\n \n Please wait for the model to load and try again'
|
193 |
return str(output)
|
194 |
|
195 |
iface = gr.Interface(
|