Heit39 commited on
Commit
7fe3527
·
verified ·
1 Parent(s): 7d98d00

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -15
app.py CHANGED
@@ -71,21 +71,27 @@ def respond(
71
  """
72
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
73
  """
74
- demo = gr.ChatInterface(
75
- respond,
76
- additional_inputs=[
77
- gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
78
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
79
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
80
- gr.Slider(
81
- minimum=0.1,
82
- maximum=1.0,
83
- value=0.95,
84
- step=0.05,
85
- label="Top-p (nucleus sampling)",
86
- ),
87
- ],
88
- )
 
 
 
 
 
 
89
 
90
 
91
  if __name__ == "__main__":
 
71
  """
72
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
73
  """
74
+ # demo = gr.ChatInterface(
75
+ # respond,
76
+ # additional_inputs=[
77
+ # gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
78
+ # gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
79
+ # gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
80
+ # gr.Slider(
81
+ # minimum=0.1,
82
+ # maximum=1.0,
83
+ # value=0.95,
84
+ # step=0.05,
85
+ # label="Top-p (nucleus sampling)",
86
+ # ),
87
+ # ],
88
+ # )
89
+
90
+ demo = gr.Interface(fn=respond,
91
+ inputs=[gr.Textbox(label="Input Text", placeholder="Input Text To Be Translated")],
92
+ outputs=gr.Textbox(label="Translation"),
93
+ title="tTranslatorR-Opus"
94
+ )
95
 
96
 
97
  if __name__ == "__main__":