diff --git a/nmrcraft/app.py b/nmrcraft/app.py deleted file mode 100644 index 72999c5..0000000 --- a/nmrcraft/app.py +++ /dev/null @@ -1,37 +0,0 @@ -import base64 - -import gradio as gr - - -# Function to encode the image to a base64 data URI -def image_to_data_uri(filepath): - with open(filepath, "rb") as image_file: - encoded_string = base64.b64encode(image_file.read()).decode("utf-8") - return f"data:image/png;base64,{encoded_string}" - - -# Encode your logo -image_data_uri = image_to_data_uri("assets/NMRcraft-logo.png") - -# HTML image tag with the base64-encoded image -logo_html = f"NMRcraft Logo" - - -# Define a placeholder response function -def respond(input_text): - return f"You said: {input_text}" - - -# Set up Gradio interface -with gr.Blocks() as demo: - # Display the logo at the top of the interface - gr.Markdown(logo_html) - - # Your interface components - with gr.Row(): - input_text = gr.Textbox(label="Enter your text below:") - output_text = gr.Textbox(label="Response") - input_text.change(fn=respond, inputs=input_text, outputs=output_text) - -# Launch the interface -demo.launch()