manoj555 commited on
Commit
7ba2254
·
verified ·
1 Parent(s): 367d864

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,7 +10,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_name)
10
  model = AutoModelForCausalLM.from_pretrained(model_name)
11
 
12
  # Create HF pipeline
13
- pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, max_length=1000, do_sample=True)
14
 
15
  # Wrap with HuggingFacePipeline for LangChain
16
  llm = HuggingFacePipeline(pipeline=pipe)
@@ -48,4 +48,4 @@ demo = gr.ChatInterface(
48
  )
49
 
50
  # Launch the app (no share=True needed for Spaces)
51
- demo.launch()
 
10
  model = AutoModelForCausalLM.from_pretrained(model_name)
11
 
12
  # Create HF pipeline
13
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, max_length=100000, do_sample=True)
14
 
15
  # Wrap with HuggingFacePipeline for LangChain
16
  llm = HuggingFacePipeline(pipeline=pipe)
 
48
  )
49
 
50
  # Launch the app (no share=True needed for Spaces)
51
+ demo.launch(share=True)