trexhere commited on
Commit
88783a0
1 Parent(s): 4ad2293

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -23,13 +23,13 @@ def invite_user(username):
23
  else:
24
  return f'Error: {response.json().get("message", "Unknown error")}'
25
 
26
- iface = gr.Interface(
27
- fn=invite_user,
28
- inputs=gr.inputs.Textbox(label="GitHub Username"),
29
- outputs=gr.outputs.Textbox(label="Response"),
30
- title='Join AccioINTERN',
31
- description='Enter your GitHub username to receive an invitation to join the AccioINTERN organization.'
32
- )
 
33
 
34
- if __name__ == "__main__":
35
- iface.launch()
 
23
  else:
24
  return f'Error: {response.json().get("message", "Unknown error")}'
25
 
26
+ with gr.Blocks() as iface:
27
+ gr.Markdown("# Join AccioINTERN")
28
+ with gr.Row():
29
+ username_input = gr.Textbox(label="GitHub Username")
30
+ response_output = gr.Textbox(label="Response", interactive=False)
31
+ submit_btn = gr.Button("Get Invitation")
32
+
33
+ submit_btn.click(fn=invite_user, inputs=username_input, outputs=response_output)
34
 
35
+ iface.launch()