AMKCode commited on
Commit
5cfec42
·
1 Parent(s): 44fe74d

space running cpu

Browse files
Files changed (1) hide show
  1. app.py +3 -12
app.py CHANGED
@@ -100,24 +100,15 @@ def button_click(hf_model_id, conv_template, quantization, oauth_token: gr.OAuth
100
 
101
  os.system("rm -rf dist/")
102
 
103
- return "successful"
104
-
105
- # demo = gr.Interface(
106
- # fn=button_click,
107
- # inputs = [gr.LoginButton(),
108
- # gr.Textbox(label="HF Model ID"),
109
- # gr.Dropdown(CONV_TEMPLATES, label="Conversation Template"),
110
- # gr.Dropdown(QUANTIZATIONS, label="Quantization Method")],
111
- # outputs = "text"
112
- # )
113
 
114
  with gr.Blocks() as demo:
115
  gr.LoginButton()
116
  model_id = gr.Textbox(label="HF Model ID")
117
  conv = gr.Dropdown(CONV_TEMPLATES, label="Conversation Template")
118
  quant = gr.Dropdown(QUANTIZATIONS, label="Quantization Method")
119
- btn = gr.Button("Convert!")
120
- out = gr.Textbox()
121
  btn.click(fn=button_click , inputs=[model_id, conv, quant], outputs=out)
122
 
123
  demo.launch()
 
100
 
101
  os.system("rm -rf dist/")
102
 
103
+ return "Successful"
 
 
 
 
 
 
 
 
 
104
 
105
  with gr.Blocks() as demo:
106
  gr.LoginButton()
107
  model_id = gr.Textbox(label="HF Model ID")
108
  conv = gr.Dropdown(CONV_TEMPLATES, label="Conversation Template")
109
  quant = gr.Dropdown(QUANTIZATIONS, label="Quantization Method")
110
+ btn = gr.Button("Convert to MLC")
111
+ out = gr.Textbox(label="Conversion Result")
112
  btn.click(fn=button_click , inputs=[model_id, conv, quant], outputs=out)
113
 
114
  demo.launch()