mimifuel2018 commited on
Commit
8b0b7cc
·
verified ·
1 Parent(s): 538a10c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py CHANGED
@@ -5,6 +5,25 @@ import dashscope
5
  from dashscope import Generation
6
  from dashscope.api_entities.dashscope_response import Role
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  # Configuration
9
  default_system = 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.'
10
  dashscope.api_key = os.getenv('HF_TOKEN')
 
5
  from dashscope import Generation
6
  from dashscope.api_entities.dashscope_response import Role
7
 
8
+ # Configuration
9
+ default_system = 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.'
10
+ dashscope.api_key = os.getenv('HF_TOKEN') # Check if this is loading correctly
11
+
12
+ # **Test Token Retrieval** (remove after testing)
13
+ print("Token:", dashscope.api_key)
14
+
15
+ # Typing definitions
16
+ History = List[Tuple[str, str]]
17
+ Messages = List[Dict[str, str]]
18
+
19
+
20
+ import os
21
+ import gradio as gr
22
+ from typing import List, Optional, Tuple, Dict
23
+ import dashscope
24
+ from dashscope import Generation
25
+ from dashscope.api_entities.dashscope_response import Role
26
+
27
  # Configuration
28
  default_system = 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.'
29
  dashscope.api_key = os.getenv('HF_TOKEN')