Syed-Hasan-8503 commited on
Commit
256be55
·
verified ·
1 Parent(s): 7445f98

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -263,7 +263,7 @@ def conversion(hf_token, Model, Username, Repo_name):
263
  )
264
 
265
  shutil.rmtree(folder)
266
- return "Successfully converted to safeTensors"
267
 
268
 
269
  inputs = [gr.Textbox(label="hf_token", elem_classes="inputs"),
@@ -272,19 +272,16 @@ gr.Textbox(label="hf_username", elem_classes="inputs"),
272
  gr.Textbox(label="Repo_name", elem_classes="inputs")]
273
 
274
 
275
- desc = "This Gradio app **GreetLucky** takes a *name as input* and creates " \
276
- "a friendly greeting along with a randomly assigned ***lucky number between 1 and 100.***"
277
-
278
- article = "The Hugging Face Model Converter is a powerful tool designed to streamline the conversion process from PyTorch.bin format to SafeTensors." \
279
  "This Gradio app offers a user-friendly interface where users can effortlessly input their Hugging Face model details," \
280
- "including the Hugging Face token, model ID, username, and repository name. With just a click of a button, the conversion process is initiated"
 
281
 
282
  demo = gr.Interface(fn=conversion,
283
  inputs=inputs,
284
  outputs=[gr.Textbox(label="Status")],
285
  title="Hugging Face Model Converter: PyTorch.bin to SafeTensors",
286
  description=desc,
287
- article=article,
288
  theme=gr.Theme.from_hub('HaleyCH/HaleyCH_Theme')
289
  )
290
 
 
263
  )
264
 
265
  shutil.rmtree(folder)
266
+ return f"Successfully converted to safeTensors and pushed to huggingface hub {repo_id}"
267
 
268
 
269
  inputs = [gr.Textbox(label="hf_token", elem_classes="inputs"),
 
272
  gr.Textbox(label="Repo_name", elem_classes="inputs")]
273
 
274
 
275
+ desc = "The Hugging Face Model Converter is a powerful tool designed to streamline the conversion process from PyTorch.bin format to SafeTensors." \
 
 
 
276
  "This Gradio app offers a user-friendly interface where users can effortlessly input their Hugging Face model details," \
277
+ "including the Hugging Face token, model ID, username, and repository name. With just a click of a button, the conversion process is initiated. Afterwards, the" \
278
+ "safeTensor file is pushed to your repository on huggingface"
279
 
280
  demo = gr.Interface(fn=conversion,
281
  inputs=inputs,
282
  outputs=[gr.Textbox(label="Status")],
283
  title="Hugging Face Model Converter: PyTorch.bin to SafeTensors",
284
  description=desc,
 
285
  theme=gr.Theme.from_hub('HaleyCH/HaleyCH_Theme')
286
  )
287