Jayveersinh-Raj commited on
Commit
5c42852
1 Parent(s): 057eaa2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -1,10 +1,18 @@
1
  import gradio as gr
 
 
 
 
 
 
 
 
2
 
3
  description = "The Indic language supported sentence completion language model"
4
  title = "Try it out!"
5
  examples = [["Hello my name is Raj and"]]
6
 
7
- interface = gr.Interface.load("huggingface/autopilot-ai/Indic-sentence-completion",
8
  description=description,
9
  examples=examples
10
  )
 
1
  import gradio as gr
2
+ from transformers import AutoModelForCausalLM
3
+
4
+ model_directory = "huggingface/autopilot-ai/Indic-sentence-completion"
5
+ model = AutoModelForCausalLM.from_pretrained(
6
+ model_directory,
7
+ load_in_8bit=True,
8
+ device_map="auto",
9
+ )
10
 
11
  description = "The Indic language supported sentence completion language model"
12
  title = "Try it out!"
13
  examples = [["Hello my name is Raj and"]]
14
 
15
+ interface = gr.Interface.load(model,
16
  description=description,
17
  examples=examples
18
  )