xyizko commited on
Commit
8f0c008
·
verified ·
1 Parent(s): 0b39f36

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -14
app.py CHANGED
@@ -66,20 +66,26 @@ model_input = gr.Textbox(
66
  visible=True
67
  )
68
 
69
- # Chat interface
70
- demo = gr.ChatInterface(
71
- fn=respond,
72
- title="HF Text Generation Model Tester",
73
- description="Add token + model name",
74
- additional_inputs=[
75
- token_input,
76
- model_input,
77
- gr.Textbox(value="You are helpful AI chatbot who reponds like a mideval knight who is extremely polite, noble and funny.", label="System Message"),
78
- gr.Slider(1, 2048, value=512, label="Max Tokens"),
79
- gr.Slider(0.1, 4.0, value=0.7, label="Temperature"),
80
- gr.Slider(0.1, 1.0, value=0.95, label="Top-p"),
81
- ],
82
- )
 
 
 
 
 
 
83
 
84
  if __name__ == "__main__":
85
  demo.launch()
 
66
  visible=True
67
  )
68
 
69
+ with gr.Blocks() as demo:
70
+ # Add the markdown link at the top
71
+ gr.Markdown("### [View External Counter](https://example.com/counter)")
72
+
73
+ [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fxyizko%2FHF_Model_Test&count_bg=%2320221E&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=views&edge_flat=false)]
74
+
75
+ # Define the chat interface
76
+ chatbot = gr.ChatInterface(
77
+ fn=respond,
78
+ title="HF Text Generation Model Tester",
79
+ description="Add token + model name",
80
+ additional_inputs=[
81
+ gr.Textbox(label="Token"),
82
+ gr.Textbox(label="Model Name"),
83
+ gr.Textbox(value="You are helpful AI chatbot who responds like a medieval knight who is extremely polite, noble and funny.", label="System Message"),
84
+ gr.Slider(1, 2048, value=512, label="Max Tokens"),
85
+ gr.Slider(0.1, 4.0, value=0.7, label="Temperature"),
86
+ gr.Slider(0.1, 1.0, value=0.95, label="Top-p"),
87
+ ],
88
+ )
89
 
90
  if __name__ == "__main__":
91
  demo.launch()