Update main.py
Browse files23 unmodified lines2425262728293031323334353637383940414243444546474823 unmodified linesallow_methods=["*"],allow_headers=["*"],)@app.get("/")def root():def get_gemini_response(input):response = model.generate_content(input, generation_config=generation_config)return response.text# Define the Gradio interfaceiface = gr.Interface(fn=get_gemini_response,inputs=[gr.Textbox(label="Enter your question here:"),],outputs=gr.Textbox(label="The response is"),title="Gemini Bot",description="Ask Gemini!!!",)# Launch the Gradio interfaceiface.launch()return {"title": "Line Bot"}@app.post("/webhook")23 unmodified lines24252627282930313233343536373839404142434445464723 unmodified linesallow_methods=["*"],allow_headers=["*"],)def get_gemini_response(input):response = model.generate_content(input, generation_config=generation_config)return response.text# Define the Gradio interfaceiface = gr.Interface(fn=get_gemini_response,inputs=[gr.Textbox(label="Enter your question here:"),],outputs=gr.Textbox(label="The response is"),title="Gemini Bot",description="Ask Gemini!!!",)# Launch the Gradio interfaceiface.launch()@app.get("/")def root():return {"title": "Line Bot"}@app.post("/webhook")
main.py+15-16