zxsipola123456 commited on
Commit
82b3f18
·
verified ·
1 Parent(s): 11fffe5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -18
app.py CHANGED
@@ -51,20 +51,9 @@ def validate_offi_api_key(api_key):
51
  except Exception as e:
52
  return f"Error: {str(e)}"
53
 
54
- # css = """
55
 
56
- # /* 可滚动的输出框 */
57
- # .output-box {
58
- # width: 100% !important
59
- # height: 200px !important
60
- # overflow-y: auto !important
61
- # border: 1px solid #ccc !important
62
- # padding: 10px !important
63
- # box-sizing: border-box !important
64
- # }
65
- # """
66
  # Gradio 前端设计
67
- app = gr.Blocks()
68
 
69
  with app:
70
  gr.Markdown("# <center>api-key验证</center>")
@@ -72,20 +61,20 @@ with app:
72
  "### <center>中转key购买地址[here](https://buy.sipola.cn),ai文案生成可使用中转key,请访问 [here](https://ai.sipola.cn)</center>")
73
  with gr.Row(variant='panel'):
74
  with gr.Column():
75
- transmit_api_key = gr.Textbox(type='password', label='中转API-Key', placeholder='请在此填写您的中转API Key')
76
- transmit_btn_text = gr.Button("点击验证中转key", variant="primary",scale=1)
77
 
78
  with gr.Column():
79
- transmit_output_textbox = gr.Textbox(label="显示key状态及可访问的模型列表", lines=5,max_lines=5)
80
  transmit_btn_text.click(validate_tran_api_key,transmit_api_key,transmit_output_textbox)
81
 
82
  with gr.Row(variant='panel'):
83
  with gr.Column():
84
- official_api_key = gr.Textbox(type='password', label='官方API Key', placeholder='请在此输入你的官方API Key')
85
- official_btn_text = gr.Button("点击验证官方key", variant="primary",scale=1)
86
 
87
  with gr.Column():
88
- official_output_textbox = gr.Textbox(label="显示key状态及可访问的模型列表", lines=5, max_lines=5 )
89
  official_btn_text.click(validate_offi_api_key, official_api_key, official_output_textbox)
90
 
91
 
 
51
  except Exception as e:
52
  return f"Error: {str(e)}"
53
 
 
54
 
 
 
 
 
 
 
 
 
 
 
55
  # Gradio 前端设计
56
+ app = gr.Blocks(css="style.css")
57
 
58
  with app:
59
  gr.Markdown("# <center>api-key验证</center>")
 
61
  "### <center>中转key购买地址[here](https://buy.sipola.cn),ai文案生成可使用中转key,请访问 [here](https://ai.sipola.cn)</center>")
62
  with gr.Row(variant='panel'):
63
  with gr.Column():
64
+ transmit_api_key = gr.Textbox(type='password', label='中转API-Key', placeholder='请在此填写您的中转API Key', elem_classes="custom-textbox")
65
+ transmit_btn_text = gr.Button("点击验证中转key", variant="primary",scale=1, elem_classes="custom-button")
66
 
67
  with gr.Column():
68
+ transmit_output_textbox = gr.Textbox(label="显示key状态及可访问的模型列表", lines=5,max_lines=5, elem_classes="custom-textbox")
69
  transmit_btn_text.click(validate_tran_api_key,transmit_api_key,transmit_output_textbox)
70
 
71
  with gr.Row(variant='panel'):
72
  with gr.Column():
73
+ official_api_key = gr.Textbox(type='password', label='官方API Key', placeholder='请在此输入你的官方API Key', elem_classes="custom-textbox")
74
+ official_btn_text = gr.Button("点击验证官方key", variant="primary",scale=1, elem_classes="custom-button")
75
 
76
  with gr.Column():
77
+ official_output_textbox = gr.Textbox(label="显示key状态及可访问的模型列表", lines=5, max_lines=5, elem_classes="custom-textbox" )
78
  official_btn_text.click(validate_offi_api_key, official_api_key, official_output_textbox)
79
 
80