Spaces:
Runtime error
Runtime error
without model
Browse files- gradio_llm_example.py +0 -10
gradio_llm_example.py
CHANGED
@@ -5,18 +5,8 @@ import os
|
|
5 |
import shutil
|
6 |
# How to RUN code ==> gradio gradio_llm_example.py
|
7 |
|
8 |
-
from langchain import HuggingFacePipeline
|
9 |
|
10 |
|
11 |
-
def load_llm_model(model: str = "google/flan-t5-large") -> HuggingFacePipeline:
|
12 |
-
llm = HuggingFacePipeline.from_model_id(
|
13 |
-
model_id=model,
|
14 |
-
task="text2text-generation",
|
15 |
-
model_kwargs={"max_length": 1500, "load_in_8bit": True},
|
16 |
-
)
|
17 |
-
return llm
|
18 |
-
|
19 |
-
|
20 |
|
21 |
# Define text and title information
|
22 |
title1 = "## </br> </br> </br> π€π¬ QA App"
|
|
|
5 |
import shutil
|
6 |
# How to RUN code ==> gradio gradio_llm_example.py
|
7 |
|
|
|
8 |
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
# Define text and title information
|
12 |
title1 = "## </br> </br> </br> π€π¬ QA App"
|