Solshine commited on
Commit
77ad276
1 Parent(s): 103bd37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
 
3
  import torch
 
4
  from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer, pipeline
5
  from threading import Thread
6
 
@@ -21,9 +22,9 @@ phi2 = pipeline(
21
  device_map="cpu"
22
  )
23
  # DSPy-based prompt generation
24
- from dspy_ai.agents import Agent
25
- from dspy_ai import spawn_processes
26
- from dspy_ai.utils import SentenceSplitter, SentimentAnalyzer, NamedEntityRecognizer
27
 
28
  def dspy_generate_agent_prompts(prompt):
29
  """
 
1
  import gradio as gr
2
 
3
  import torch
4
+ import dspy
5
  from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer, pipeline
6
  from threading import Thread
7
 
 
22
  device_map="cpu"
23
  )
24
  # DSPy-based prompt generation
25
+ from dspy.agents import Agent
26
+ from dspy import spawn_processes
27
+ from dspy.utils import SentenceSplitter, SentimentAnalyzer, NamedEntityRecognizer
28
 
29
  def dspy_generate_agent_prompts(prompt):
30
  """