Update app.py
Browse files
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=
|
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)
|