cryptocalypse commited on
Commit
e142fe5
·
verified ·
1 Parent(s): 14e99c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -20
app.py CHANGED
@@ -39,25 +39,48 @@ def respond(
39
  response += token
40
  yield response
41
 
42
- """
43
- For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
44
- """
45
- demo = gr.ChatInterface(
46
- respond,
47
- additional_inputs=[
48
- gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
49
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
50
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
51
- gr.Slider(
52
- minimum=0.1,
53
- maximum=1.0,
54
- value=0.95,
55
- step=0.05,
56
- label="Top-p (nucleus sampling)",
57
- ),
58
- ],
59
- )
60
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
  if __name__ == "__main__":
63
- demo.launch()
 
39
  response += token
40
  yield response
41
 
42
+ with gr.Blocks(title="Holmes pubication manager",css=css,js=js) as app:
43
+
44
+ chatBot = gr.ChatInterface(
45
+ respond,
46
+ retry_btn=None,
47
+ undo_btn="Undo",
48
+ clear_btn="Clear",
49
+ examples=["Dame un tweet de noticias de Barcelona"]
50
+ )
51
+
52
+ """
53
+ with gr.Tab("Publish"):
54
+ tweet = gr.Textbox(value="Tweet",label="The text to tweet",scale=3)
55
+ link = gr.Textbox(value="Tweet",label="Prompt to gematria conversion for apply ELS",scale=3)
56
+ img = gr.Image()
57
+ tw_btn = gr.Button("Publish",scale=1)
58
+
59
+ with gr.Tab("X Auth"):
60
+ with gr.Row():
61
+ permisions = gr.CheckboxGroup(["Read"],value=["Read & write"], label="Books", info="Torah books source")
62
+ with gr.Row():
63
+ api_key = gr.Textbox(value="Api Key",label="Api Key",scale=3)
64
+ api_key_secret = gr.Textbox(value="Tweet",label="Api key secret",scale=3)
65
+ access_token = gr.Textbox(value="Tweet",label="Access Token",scale=3)
66
+ access_token_secret = gr.Textbox(value="Access Token Secret",label="The text to tweet",scale=3)
67
+ bearer = gr.Textbox(value="Bearer",label="The text to tweet",scale=3)
68
+
69
+
70
+ with gr.Tab("Accounts Listening"):
71
+ with gr.Row():
72
+ list_accounts = gr.Textbox(value="Accounts",label="Account list to listen",scale=3)
73
+ with gr.Tab("Holmesbot Settings"):
74
+ with gr.Row():
75
+ user = gr.Textbox(value="Email",label="The text to tweet",scale=3)
76
+ password = gr.Textbox(value="Password",label="The text to tweet",scale=3)
77
+
78
+ with gr.Tab("Publish"):
79
+ with gr.Row():
80
+ textpub = gr.Textbox(label="Text Publish",scale=3)
81
+ imgpub = gr.Textbox(scale=2)
82
+ zir_btn = gr.Button("Publish",scale=1)
83
+ """
84
 
85
  if __name__ == "__main__":
86
+ app.launch()