Sandhya commited on
Commit
23de78e
·
1 Parent(s): bd575b4

First Commit

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -77,13 +77,13 @@ def chat_function(user_message, history, model_id):
77
 
78
 
79
  def create_gradio_app():
80
- with gr.Blocks(title="Model Card Chatbot") as demo:
81
  gr.Markdown("## 🤖 Model Card Chatbot\nAsk questions about Hugging Face model card")
82
  with gr.Row():
83
- model_id=gr.Textbox(label="MODEL ID", value="google/gemma-2-2b")
84
- user_input=gr.Textbox(label="Your Question",placeholder="Ask something about the model card .....")
85
  send=gr.Button("Ask")
86
- chatbot=gr.Chatbot(label="chat")
87
  send.click(fn=chat_function, inputs=[user_input,chatbot,model_id], outputs=[chatbot,user_input])
88
  return demo
89
  gradio_app=create_gradio_app()
 
77
 
78
 
79
  def create_gradio_app():
80
+ with gr.Blocks(title="Model Card Chatbot",css=".gr-box{max-width: 800px; margin: auto;}") as demo:
81
  gr.Markdown("## 🤖 Model Card Chatbot\nAsk questions about Hugging Face model card")
82
  with gr.Row():
83
+ model_id=gr.Textbox(label="MODEL ID", value="google/gemma-2-2b",scale=2)
84
+ user_input=gr.Textbox(label="Your Question",placeholder="Ask something about the model card .....",lines=1, scale=3)
85
  send=gr.Button("Ask")
86
+ chatbot=gr.Chatbot(label="chat",height=200)
87
  send.click(fn=chat_function, inputs=[user_input,chatbot,model_id], outputs=[chatbot,user_input])
88
  return demo
89
  gradio_app=create_gradio_app()