Mxytyu commited on
Commit
4dc47ca
1 Parent(s): 67c6663

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -33
app.py DELETED
@@ -1,33 +0,0 @@
1
- import gradio as gr
2
-
3
- # Define a blue-themed CSS for the interface
4
- blue_theme_css = """
5
- body {background-color: #e0f7fa;} /* Light blue background */
6
- .gradio-app {color: #0d47a1;} /* Dark blue text for general elements */
7
- .button {background-color: #42a5f5 !important;} /* Medium blue button */
8
- .button:hover {background-color: #1e88e5 !important;} /* Darker blue on hover */
9
- """
10
-
11
- # Define the assistant prompt with the name "Se" for the model
12
- assistant_prompt = "You are a helpful assistant named Se. Answer questions concisely and helpfully, as if you're assisting the user personally."
13
-
14
- # Define a function to interact with the model, taking input and adding context
15
- def assistant_response(user_input):
16
- # Here, you'd modify this to pass the assistant_prompt to your model API
17
- response = gr.load("models/meta-llama/Llama-3.2-3B-Instruct")(f"{assistant_prompt} {user_input}")
18
- return response
19
-
20
- # Create the Gradio Interface for the API
21
- app = gr.Interface(
22
- fn=assistant_response,
23
- inputs="text",
24
- outputs="text",
25
- css=blue_theme_css,
26
- title="Helpful Assistant API",
27
- description="Ask Se anything, and they'll do their best to help!",
28
- examples=["What's the weather like today?", "Explain Python decorators."],
29
- flagging_mode="never" # Updated parameter
30
- )
31
-
32
- # Launch the app and make it API accessible
33
- app.launch(api_name="get_help") # Removed enable_queue