File size: 587 Bytes
c3750ee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# AI-Assisted Code — Academic Integrity Notice
# Generated with The App Builder. ESCP coursework.
# Student must be able to explain all code when asked.

import gradio as gr

def greet(name):
    """Return a greeting message."""
    if not name.strip():
        return "Please enter your name."
    return f"Hello {name}, your HF app works!"

demo = gr.Interface(
    fn=greet,
    inputs=gr.Textbox(label="Your name"),
    outputs=gr.Textbox(label="Output"),
    title="My First Hugging Face App",
    description="A basic Gradio app deployed on Hugging Face Spaces."
)

demo.launch()