zhangyong hace 6 meses
padre
commit
dee19f6d9f

+ 1 - 1
common/odps_data.py

@@ -20,7 +20,7 @@ class OdpsDataCount:
         )
         data_values = []
         try:
-            dt = "2024092717"
+            dt = "2024100819"
             sql = f'SELECT videoid,title,video_path FROM {project}.{table} WHERE dt = "{dt}" '
             with odps.execute_sql(sql).open_reader() as reader:
                 for row in reader:

+ 1 - 2
google_ai/generativeai_video.py

@@ -313,8 +313,7 @@ async def main(video_path):
                                "品类-中国历史影像\n" \
                                "品类-国际军事\n" \
                                "品类-国内军事\n" \
-                               "品类-国家统一\n" \
-                               "输出格式:要求输出格式为符合RFC8259标准的JSON格式的字符串"
+                               "品类-国家统一\n"
 
 
     # 分析视频并打印结果

+ 2 - 3
video_processing/video_processing.py

@@ -23,9 +23,8 @@ class VideoProcessing:
         try:
             response = response.json()
             result = response['result']
-            cleaned_string = result.replace( "```json", '' ).replace( "```", '' ).strip()
-            print(cleaned_string)
-            json_data = json.loads(cleaned_string)
+            print(result)
+            json_data = json.loads(result)
             return json_data
         except Exception as e:
             print(f"视频请求异常:{e}")