DeadfoxX commited on
Commit
75bd4f4
1 Parent(s): fb63e6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -8
app.py CHANGED
@@ -1,10 +1,16 @@
1
- import gradio as gr
2
- from souleater-diffusion.ckpt
3
- import pipeline
4
 
5
- pipeline = pipeline(task="image-generation", model="souleater-diffusion.ckpt
6
- ")
 
 
7
 
8
- gr.Interface(
9
- title="souleater-diffusion",
10
- ).launch()
 
 
 
 
 
 
1
+ import torch
2
+ import transformers
 
3
 
4
+ # Load the checkpoint file into a PyTorch model
5
+ model = YourModelClass()
6
+ state_dict = torch.load('souleater-diffusion.ckpt')
7
+ model.load_state_dict(state_dict)
8
 
9
+ # Save the model architecture and weights to a file
10
+ torch.save(model.state_dict(), 'souleater-diffusion.pth')
11
+
12
+ # Register the model with Hugging Face
13
+ model_name = "DeadfoxX/souleater-diffusion"
14
+ model_id = transformers.Model.upload(model_name, "souleater-diffusion.pth")
15
+
16
+ print(f"Model uploaded with ID: {model_id}")