Spaces:
Running
Running
update qwen
Browse files- app.py +9 -4
- requirements.txt +3 -4
app.py
CHANGED
@@ -16,7 +16,9 @@ load_dotenv()
|
|
16 |
HUGGINGFACEHUB_API_TOKEN = os.getenv('HUGGINGFACEHUB_API_TOKEN')
|
17 |
|
18 |
# Initialize the model instances
|
19 |
-
repo_id = "mistralai/Mistral-7B-Instruct-v0.2"
|
|
|
|
|
20 |
llm_model_instance = HuggingFaceEndpoint(
|
21 |
repo_id=repo_id, max_length=128, temperature=0.5, token=HUGGINGFACEHUB_API_TOKEN
|
22 |
)
|
@@ -26,7 +28,10 @@ embedder_model_instance = HuggingFaceInferenceAPIEmbeddings(
|
|
26 |
)
|
27 |
|
28 |
graph_config = {
|
29 |
-
"llm": {
|
|
|
|
|
|
|
30 |
"embeddings": {"model_instance": embedder_model_instance}
|
31 |
}
|
32 |
|
@@ -50,8 +55,8 @@ with gr.Blocks() as demo:
|
|
50 |
with gr.Row():
|
51 |
with gr.Column():
|
52 |
|
53 |
-
model_dropdown = gr.Textbox(label="Model", value="
|
54 |
-
prompt_input = gr.Textbox(label="Prompt", value="List
|
55 |
source_input = gr.Textbox(label="Source URL", value="https://www.whitehouse.gov/")
|
56 |
scrape_button = gr.Button("Scrape and Summarize")
|
57 |
|
|
|
16 |
HUGGINGFACEHUB_API_TOKEN = os.getenv('HUGGINGFACEHUB_API_TOKEN')
|
17 |
|
18 |
# Initialize the model instances
|
19 |
+
#repo_id = "mistralai/Mistral-7B-Instruct-v0.2"
|
20 |
+
repo_id = "Qwen/Qwen2.5-72B-Instruct"
|
21 |
+
|
22 |
llm_model_instance = HuggingFaceEndpoint(
|
23 |
repo_id=repo_id, max_length=128, temperature=0.5, token=HUGGINGFACEHUB_API_TOKEN
|
24 |
)
|
|
|
28 |
)
|
29 |
|
30 |
graph_config = {
|
31 |
+
"llm": {
|
32 |
+
"model_instance": llm_model_instance,
|
33 |
+
"model_tokens": 100000,
|
34 |
+
},
|
35 |
"embeddings": {"model_instance": embedder_model_instance}
|
36 |
}
|
37 |
|
|
|
55 |
with gr.Row():
|
56 |
with gr.Column():
|
57 |
|
58 |
+
model_dropdown = gr.Textbox(label="Model", value="Qwen/Qwen2.5-72B-Instruct")
|
59 |
+
prompt_input = gr.Textbox(label="Prompt", value="List all the press releases with their headlines and urls.")
|
60 |
source_input = gr.Textbox(label="Source URL", value="https://www.whitehouse.gov/")
|
61 |
scrape_button = gr.Button("Scrape and Summarize")
|
62 |
|
requirements.txt
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
-
gradio==4.
|
2 |
-
langchain_community==0.
|
3 |
python-dotenv==1.0.1
|
4 |
-
scrapegraphai==1.
|
5 |
-
playwright==1.43.0
|
|
|
1 |
+
gradio==4.44.1
|
2 |
+
langchain_community==0.3.1
|
3 |
python-dotenv==1.0.1
|
4 |
+
scrapegraphai==1.25.1
|
|