NicolasSP90 commited on
Commit
43a02e9
1 Parent(s): 0788d03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -3
app.py CHANGED
@@ -146,10 +146,21 @@ def correct_bases(base_dict, given_base):
146
  # Returning the corrected Dictionary
147
  return base_dict
148
 
149
- # %%
 
 
 
 
 
 
 
 
 
 
 
150
  import gradio as gr
151
 
152
- calc = gr.Interface(fn=basecalc, inputs=[gr.Number(), gr.Number(), gr.Number()], outputs=["text", "text", "text", "text"])
153
 
154
  if __name__ == "__main__":
155
- calc.launch()
 
146
  # Returning the corrected Dictionary
147
  return base_dict
148
 
149
+ #%%
150
+ def resposta(base, número1, numero2):
151
+ base_, nsum_final_, nmult_final_, ndiff_final_= basecalc(base, número1, numero2)
152
+ base_ = f"Base: {base_}"
153
+ nsum_final_ = f"Sum: {nsum_final_}"
154
+ nmult_final_= f"Multiplication: {nmult_final_}"
155
+ ndiff_final_= f"Difference: {ndiff_final_}"
156
+
157
+ return base_, nsum_final_, nmult_final_, ndiff_final_
158
+
159
+
160
+ #%%
161
  import gradio as gr
162
 
163
+ calc = gr.Interface(fn=resposta, inputs=[gr.Number(), gr.Number(), gr.Number()], outputs=["text", "text", "text", "text"], )
164
 
165
  if __name__ == "__main__":
166
+ calc.launch()