Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -24,21 +24,6 @@ app.add_middleware(
|
|
24 |
allow_methods=["*"],
|
25 |
allow_headers=["*"],
|
26 |
)
|
27 |
-
def get_gemini_response(input):
|
28 |
-
response = model.generate_content(input, generation_config=generation_config)
|
29 |
-
return response.text
|
30 |
-
# Define the Gradio interface
|
31 |
-
iface = gr.Interface(
|
32 |
-
fn=get_gemini_response,
|
33 |
-
inputs=[
|
34 |
-
gr.Textbox(label="Enter your question here:"),
|
35 |
-
],
|
36 |
-
outputs=gr.Textbox(label="The response is"),
|
37 |
-
title="Gemini Bot",
|
38 |
-
description="Ask Gemini!!!",
|
39 |
-
)
|
40 |
-
# Launch the Gradio interface
|
41 |
-
iface.launch()
|
42 |
|
43 |
@app.get("/")
|
44 |
def root():
|
|
|
24 |
allow_methods=["*"],
|
25 |
allow_headers=["*"],
|
26 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
@app.get("/")
|
29 |
def root():
|