krrishD commited on
Commit
b84414f
·
1 Parent(s): c7fbabd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -1
app.py CHANGED
@@ -280,6 +280,48 @@ with gr.Blocks() as demo:
280
  btn.click(chat, [inp, user_state], [output, user_state])
281
  btn.click(clear, inp, inp)
282
  gr.Markdown("""### need help? got feedback? have thoughts? etc. ➜ Join the [Discord](https://discord.gg/KvG3azf39U)""")
283
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  if __name__ == "__main__":
285
  demo.launch(debug=True)
 
280
  btn.click(chat, [inp, user_state], [output, user_state])
281
  btn.click(clear, inp, inp)
282
  gr.Markdown("""### need help? got feedback? have thoughts? etc. ➜ Join the [Discord](https://discord.gg/KvG3azf39U)""")
283
+ gr.Examples(examples=['''---------------------------------------------------------------------------
284
+ RuntimeError Traceback (most recent call last)
285
+ /var/folders/49/9g9lxm9d3f3br8zlg2l2fmz80000gn/T/ipykernel_1349/2634282627.py in <module>
286
+ ----> 1 torch.onnx.export(model, x, "output.onnx")
287
+
288
+ /opt/anaconda3/lib/python3.9/site-packages/torch/onnx/utils.py in export(model, args, f, export_params, verbose, training, input_names, output_names, operator_export_type, opset_version, do_constant_folding, dynamic_axes, keep_initializers_as_inputs, custom_opsets, export_modules_as_functions)
289
+ 502 """
290
+ 503
291
+ --> 504 _export(
292
+ 505 model,
293
+ 506 args,
294
+
295
+ /opt/anaconda3/lib/python3.9/site-packages/torch/onnx/utils.py in _export(model, args, f, export_params, verbose, training, input_names, output_names, operator_export_type, export_type, opset_version, do_constant_folding, dynamic_axes, keep_initializers_as_inputs, fixed_batch_size, custom_opsets, add_node_names, onnx_shape_inference, export_modules_as_functions)
296
+ 1527 _validate_dynamic_axes(dynamic_axes, model, input_names, output_names)
297
+ 1528
298
+ -> 1529 graph, params_dict, torch_out = _model_to_graph(
299
+ 1530 model,
300
+ 1531 args,
301
+
302
+ /opt/anaconda3/lib/python3.9/site-packages/torch/onnx/utils.py in _model_to_graph(model, args, verbose, input_names, output_names, operator_export_type, do_constant_folding, _disable_torch_constant_prop, fixed_batch_size, training, dynamic_axes)
303
+ 1113
304
+ 1114 try:
305
+ -> 1115 graph = _optimize_graph(
306
+ 1116 graph,
307
+ 1117 operator_export_type,
308
+
309
+ /opt/anaconda3/lib/python3.9/site-packages/torch/onnx/utils.py in _optimize_graph(graph, operator_export_type, _disable_torch_constant_prop, fixed_batch_size, params_dict, dynamic_axes, input_names, module)
310
+ 580 _C._jit_pass_lint(graph)
311
+ 581 _C._jit_pass_onnx_autograd_function_process(graph)
312
+ --> 582 C._jit_pass_lower_all_tuples(graph)
313
+ 583
314
+ 584 # we now record some ops like ones/zeros
315
+
316
+ RuntimeError: outerNode->outputs().size() == node->inputs().size() INTERNAL ASSERT FAILED at "/Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/jit/passes/dead_code_elimination.cpp":140, please report a bug to PyTorch.''', '''error[E0382]: use of moved value: `primes`
317
+ --> src/main.rs:9:31
318
+ |
319
+ 9 | if vectorIsPrime(num, primes) {
320
+ | ^^^^^^ value moved here, in previous iteration of loop
321
+ |
322
+ = note: move occurs because `primes` has type `std::vec::Vec<u64>`, which does not implement the `Copy` trait
323
+ ''', "Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object."],
324
+ inputs=inp,
325
+ cache_examples=False,)
326
  if __name__ == "__main__":
327
  demo.launch(debug=True)