Spaces:
Runtime error
Runtime error
lite_metadata: | |
gradio_version: 3.32.0 | |
liteobj_version: 0.0.7 | |
class_string: gradio.interface.Interface | |
kwargs: | |
title: gitio date regex | |
description: Given two numbers, find the lowest common factor and subtract it from | |
100 | |
article: null | |
thumbnail: null | |
theme: gradio/seafoam | |
css: null | |
allow_flagging: never | |
inputs: | |
- class_string: gradio.components.Number | |
kwargs: | |
label: num1 | |
precision: 0 | |
- class_string: gradio.components.Number | |
kwargs: | |
label: num2 | |
precision: 0 | |
outputs: | |
- class_string: gradio.components.Number | |
kwargs: | |
label: output | |
precision: 0 | |
fn: | |
class_string: gradify.gradify_closure | |
kwargs: | |
argmaps: | |
- label: num1 | |
postprocessing: null | |
- label: num2 | |
postprocessing: null | |
func_kwargs: {} | |
source: "def lowest_common_factor(num1, num2):\n factors1 = set()\n factors2\ | |
\ = set()\n for i in range(1, num1 + 1):\n if num1 % i == 0:\n \ | |
\ factors1.add(i)\n for i in range(1, num2 + 1):\n if\ | |
\ num2 % i == 0:\n factors2.add(i)\n common_factors = factors1.intersection(factors2)\n\ | |
\ return 100 - min(common_factors) if common_factors else 100\n" | |