VenkateshRoshan commited on
Commit
63139f9
·
1 Parent(s): 3a50cd3

app.py style updated

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -5,6 +5,7 @@ from huggingface_hub import InferenceClient
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
  """
7
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
 
8
 
9
 
10
  def respond(
@@ -58,6 +59,8 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
58
  # ],
59
  # )
60
 
 
 
61
  with gr.Blocks() as demo :
62
  with gr.Row():
63
  query = gr.Textbox(label="Enter your Query : ")
@@ -67,7 +70,7 @@ with gr.Blocks() as demo :
67
  with gr.Row():
68
  output = gr.Textbox(label="Response : ")
69
 
70
- enter.click(respond, query, history, "You are a friendly Chatbot.", 512, 0.7, 0.95, outputs=output)
71
 
72
 
73
  if __name__ == "__main__":
 
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
  """
7
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
8
+ pipe = client.pipeline("text2text-generation")
9
 
10
 
11
  def respond(
 
59
  # ],
60
  # )
61
 
62
+ # history = []
63
+
64
  with gr.Blocks() as demo :
65
  with gr.Row():
66
  query = gr.Textbox(label="Enter your Query : ")
 
70
  with gr.Row():
71
  output = gr.Textbox(label="Response : ")
72
 
73
+ enter.click(respond, query, history, "You are a friendly Chatbot.", 512, 0.7, 0.95)
74
 
75
 
76
  if __name__ == "__main__":